0

次のような文字列の例があります。

There is one wherever you one and here is the one , nowhere is the one .

2 番目oneと 3 番目の間one、つまり、and here is the

それに応じてパターンを配置する方法がわかりません..誰か助けてもらえますか?

4

1 に答える 1

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 
于 2013-08-31T03:20:37.613 に答える