I have the following strings:
NAME John Nash FROM California
NAME John Nash
I want a regular expression capable of extracting 'John Nash' for both strings.
Here is what I tried
"NAME(.*)(?:FROM)"
"NAME(.*)(?:FROM)?"
"NAME(.*?)(?:FROM)?"
but none of these works for both strings.