I need to test if an address contains a particular placename from a list of placenames. For example, if I have an address that looks like `123 someplace, someStreet, dublin` then the following regex `(dublin|cork|galway)` will give me county `dublin`. 

The problem is if `dublin` was to appear in some other portion of the address e.g. `123 someplace, dublin road, cork` then I'll still get `dublin` but I actually want `cork`.

Is it possible to write a regex to get the last occurrence, if any, of a list of possible match words. I see that C# regexes have a right-to-left option, that would be great but I don't think Javascript has anything like that, does it?

Note that I can't rely on the formatting of the address, so there might not be commas delimiting the string. Also, although it is very likely that the word I'm looking for is the very last word in the string, this might not always be the case.