Hi,
How do I extract 'Belgium' from 'BE (Belgium)'?
I looked for solutions here but somehow, I am only getting 'BE' as output.
Thank you.
I took a different approach, I used text to columns and used the ( as my delimiter. Then I used a formula to remove the other ) and that would just leave me with the text inside the parentheses. See the attached file and let me know if it works.
Hi @crazybeauti_ful,
can you explain the wider context? Do you always want to extract what is inside two brackets? Or do you always want to get the word Belgium? Can you provide a minimal sample?
If you can't provide a sample, here are some things you might want to look for: Regex and Formula.
Best
Alex
Hi @crazybeauti_ful, you could use the regex tool and construct relevant Regex expression to parse out the text between brackets. Attached is a sample to help you get started and expand upon.
Hi @grossal , I need to always get the data inside the parenthesis. I did try regex but I only got either the first 2 letters (outside the parenthesis) or 0.
I like your thinking @dannyg !
@Rob48 this would be the formula for a column called "Field" :REGEX_Replace([Field], ".*\((.*)\).*", "$1")
it replaces the whole expression with the first capture group (a capture group is what is in () and $1 calls back to the first capture group), which would be Belgium in this case
I've found this Regex cheat sheet to help tremendously!