Find word that does not come after another word with RegEx

Viewed 643

What is the RegEx pattern I should use in order to match a specific word that does not come after another specific word?

For example:

I'm looking for an "abc" that does not come after "xyz", so the following will match:

xxabc

p abc

And the following will not:

xyz abc

Thanks!

2 Answers
Related