Say I have a sentence:
I am a good buy and bad boy too
How to select every word except boy in this sentence using regular expression ?
You can use negative look behind:
w+(?<!boy)
Or negative look ahead since not all support negative look behind
(?!boy)w+
You can read about negative look ahead here
1.4m articles
1.4m replys
5 comments
56.9k users