How to use ripgrep to find adjacent duplicated words.
for example
one hello hello world
How to locate
hello hello
by using ripgrep?
Solved
----
rg '(hello)[[:blank:]]+\1' --pcre2 <<<'one hello hello world'
Asked by jian
(597 rep)
Feb 2, 2022, 04:33 PM
Last activity: Feb 2, 2022, 08:51 PM
Last activity: Feb 2, 2022, 08:51 PM