With regex, from the following sentence
my name is oscar my name is oscar my name is oscar my name is david my name is oscar
I would like to get the "oscar" immediately previous to david (in this case would be the 3rd "oscar")
I've tried many things but none of them have worked.
Any ideas? Thanks