Hi,
I have Name filed. SOME names have acronyms associated with them. The are set off by opening and closing parentheses (). I want to split the field into 2 new fields, one for Name and one for Acronym.
Example:
EAT MORE TACOS (EMT) |
EAT MORE TACOS |
My REGEX is set to (^.*)\s(\([A-Z].*\)). It works if the acronym is present, but it does not work if the acronym is not present.
How do I make this work?
Thanks,
Solved! Go to Solution.
Hi,
Try the following RegEx:
(^[^\(]*)\s(\([A-Z].*\))*
The two changes I made are as follows:
I changed your "any character" search to "any character other than an open parentheses" with [^\(]* instead of .*
I made your second argument (the one looking for anything in parentheses) optional with a * at the end.