I have lots of data in a directory, I want to find any instances of double words that aren't numbers. I started with this from here:
\b(\w+) \1\b
And expanded it to include what I don't want in the results:
(?!(?:one|two|three|four|five|six|seven|eight|nine|oh|zero))\b(\w+) \1\b
This works when I put it into regex101 as a python expression (since that's all i'm familiar with), but not when I use it in a grep command. I realized I can't use the !, so I tried this after reading this question:
grep -Proh "\b(\w+) \1\b" | grep -Prohv "?(?:one|two|three|four|five|six|seven|eight|nine|oh|zero)"
Which returns "grep: nothing to repeat". I'm unsure if I am using the correct grep parameters, or what is wrong with the regex I am using.
Sample data to match:
today to evaluate for possibilities. doubt that that is occurring
Sample data to ignore:
specific gravity one point zero zero seven