我有一些示例字符串,如:
There is one wherever you one and here is the one , nowhere is the one .
我想在第二个one
和第三个one
之间进行提取,即and here is the
我不确定如何相应地定位我的模式..任何人都可以帮忙吗?
答案 0 :(得分:1)
\K非常不受欢迎
grep -oP '^(.*?one){2}\K.*?(?=one)' \
<<< "There is one wherever you one and here is the one , nowhere is the one"
and here is the