I have the following example
"Foo tells bar that bar likes potato. Bar tells foo that bar does not like potato."
I want the substring between potato and preceding occurrence of bar. So In this example, I want "bar likes potato" and also want "bar does not like potato" as the result. How can I achieve this through one regex? I know if I apply two separate regex I could get the results but I want to know if this is possible with only one regex.
Thanks, RG