Reputation: 21
I'm using Google Sheets, which uses RE2 syntax. All my data has brackets at the end of the string with numbers and sometimes other characters also. Some rows have more than one set of brackets with something in there. I only want to remove the last set of brackets and the content between
If I have:
This is a bit random (2019)(861.01)
Then I want to return:
This is a bit random (2019)
and if I have:
This is a bit random (861.01)
I want to return:
This is a bit random
Any assistance would be greatly appreciated!
Upvotes: 0
Views: 1006
Reputation: 1
if you dont want to use TRIM
try:
=ARRAYFORMULA(REGEXREPLACE(REGEXREPLACE(A2:A, "\(([^)]*)\)[^(]*$", ), " $", ))
Upvotes: 1