RegEx Match Last Occurrence of a Word

Viewed 21

I just want to match the last occurrence of a word, for example:

abc
abc
abc
abc

The only thing that should be captured from the example text above, should be the 4th instance of "abc".

I've found the following: (abc)(?!.abc) but it matches the first occurrence instead of the last.

Any help?

0 Answers
Related