【发布时间】:2010-01-15 20:08:47
【问题描述】:
假设我有以下字符串:
这是一个测试 测试。这只是一个测试。结束。
我想选择this is a test 和this is only a test。我到底需要做什么?
我尝试的以下正则表达式产生了一个愚蠢的结果:
this(.*)test(我也想捕捉它之间的内容)
返回this is a test for the sake of testing. this is only a test
我好像很容易忘记这件事。
【问题讨论】:
标签: regex