Match only the last instance of a regex that I only know partially
Advertisements I want to match just the last instance of a regular expression. For example in this string: some text here foo word bar and foo word foo word foo word bar more text here I am trying to only match the bolded portion. Here is what I have tried currently: /foo?.+?bar/gi However, it is… Read More Match only the last instance of a regex that I only know partially