Hello.
I need help with a RegEx problem:
I want to find occurences of two known words ("foo" and "bar" for example), that have any white space other than EXACTLY ONE SPACE CHARACTER between them.
In the text that I have to grep, there may be spaces, tabs, CRs, LFs or any combination of them between the two words.
In RegEx words:
I need one regular expression that matches "foo[ \t\n\r]+bar"
but does NOT match "foo bar"
.
Everything I've tried so far either missed some combinations or also matched the single-space-case which is the only one that should NOT match.
Thanks in advance for any solutions.
EDIT: To clarify, I'm using Perl compatible RegEx here.