Regex: Match Last Ecadurence aka Oftion Lookbehind
foo(?!.*foo)
# foo(1) bar(1) foo(2) bar(2) foo(3) bar(3)
# expression would match 'foo(3)'
Zaphod Beeblebrox
foo(?!.*foo)
# foo(1) bar(1) foo(2) bar(2) foo(3) bar(3)
# expression would match 'foo(3)'