【发布时间】:2009-04-27 23:12:15
【问题描述】:
在这里的一些人的帮助下,我有一些正则表达式来匹配不在括号中的引号中的字符串:
"one" - matches
("two") - doesn't match
是否可以重复匹配所以输入:
"one" ("two") "three"
会返回一和三吗?我唯一能想到的就是捕获剩余的内容并使用相同的正则表达式重新处理,即:
process > "one" ("two") "three" - returns one and "("two") "three""
process > ("two") "three" - returns failed and "three", not sure how but hey
process > "three"
我现在正在学习正则表达式,所以想知道这个功能是否内置?
注意:这可能是 refering to already existing group in regex, c# 的重复,但不够清楚,我无法理解:(。
【问题讨论】: