Here\'s something I\'m trying to do with regular expressions, and I can\'t figure out how. I have a big file, and strings abc, 123 and xyz
abc
123
xyz
You could use lookaround.
/^abc(?!.*abc).*123.*(?
(I've not tested it.)