I am looking for regex that will allow me to extract the names and drop everything inside the parentheses. Example data below.
Text string:
John (Juan, Jonathan, Jon, Jonny) James Doe (born on January 1, 1900)
Desired output:
John James Doe
Further in some cases the text string may be like:
John (Juan, Jonathan, Jon, Jonny) James Doe (born on January 1, 1900) (Canada)
and in this case we would still want returned:
John James Doe
I tried the solution from the linked question, but I still get the wrong output:
John James Doe (born on January 1, 1900)