The easiest way is a negative lookbehind assertion:
(?<!xyz)(?<!xyz )abc
Your variation in spacing between letter groups, however, suggests that you might see some variation in distance between abc
and xyz
. If you only want to find abc if it is never preceded by xyz earlier in the string, then you may need something more along the lines of this:
^(?!xyz)*((?!xyz).)*abc
The latter regular expression uses an equivalent of inverse matching rather than a negative lookbehind assertion.