Regex: Cocokkan kejadian terakhir alias lookbehind negatif

foo(?!.*foo)

# foo(1) bar(1) foo(2) bar(2) foo(3) bar(3) 
# expression would match 'foo(3)'
Zaphod Beeblebrox