Hi guys,
I'm trying to figure out how to remove only the last set of parentheses and the text inside them from a paragraph of text and was wondering if you could help me?
Here's an example:
In this extremely (boring) example I need help (trying) to remove only the final set of parentheses (Remove me and the text as well)
Any help would be massively appreciated!
Solved! Go to Solution.
Hi @PickleRick ,
if I've understood correctly, you want to remove the last parantheses only, meaning
In this extremely (boring) example I need help (trying) to remove only the final set of parentheses (Remove me)
=>
In this extremely (boring) example I need help (trying) to remove only the final set of parentheses Remove me
This is possible using string functions (ReverseString, ReplaceFirstChar). I've created a sample workflow. Let me know if it works for you.
Best,
Roland
Here's one way. I'm sure there are many more,
ReverseString(ReplaceFirst(ReplaceFirst(ReverseString([Field1]), '(', ''), ')', ''))
Hi @RolandSchubert thanks for the quick reply!
Sorry I should have made it more clear, the final parentheses and the text inside as well.
What about this?
regex_replace([Field1], '(.*)(\(.*\))(.*)', '\1\3')
hi @PickleRick,
What do you think of this: replace regex formula tool: REGEX_Replace([Data], "\([^)]+\)$", "")
Let me know if that works
Best,
Vianney
Thanks for all the great responses! After testing @VianneyM's worked best, thanks so much!
It worked well for me. Thank you!
User | Count |
---|---|
19 | |
15 | |
15 | |
9 | |
8 |