If I have this string:
"The quick brown fox jumped over the lazy dog. What a nice brown fox that is."
What regex would I use to match the text 'brown fox' but not where the following word is 'that', i.e. (matches in italic):
"The quick brown fox jumped over the lazy dog. What a nice brown fox that is."
You need a zero-width negative lookahead assertion, i.e.,
brown fox(?! that)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With