L
Luna
I need to write a regular expression that would match the last occurrence of
one of the following words
ABC
123
XYZ
Apple
Apple sdhfjh ABC dsfd df XYZ dfd dfdf dakj
this input would match: XYZ
123 XYZ sdfjksd ABC
this input would match: ABC
TY
Luna
one of the following words
ABC
123
XYZ
Apple
Apple sdhfjh ABC dsfd df XYZ dfd dfdf dakj
this input would match: XYZ
123 XYZ sdfjksd ABC
this input would match: ABC
TY
Luna