【发布时间】:2019-01-20 17:25:18
【问题描述】:
我想要一个 PCRE 正则表达式来创建类似于 question 的二元组配对,但没有重复的单词。
Full Match: apple orange plum
Group 1: apple orange
Group 2: orange plum
我最接近它的是这个,但是第二组中没有捕获到“橙色”。
(\b.+\b)(\g<1>)\b
【问题讨论】:
-
“类似这个问题”?什么问题?
-
道歉已修复。
-
你想要像
(?=(\w+\s+\w+))这样的东西
标签: regex pcre regex-group