Regex question

Hello,
I am trying to extract anything between (). Here is my regex (tried both):\40(.+)\41 OR ((.+))
Here is my sample data:
Tree (hold) Inc.
(FUTURE OWNED) WILD WATER

Neither of these regex statements in String Manipulation regex or in Regex Split produce results.
What am I doing wrong?

Hi,

Try this in “Regex Split” node and you will get the string between the parentheses:
.*\((.*)\).*

Best,
Armin

1 Like

I tried. I get the warning WARN Regex Split 3:20 5321 input string(s) did not match the pattern or contained more groups than expected, and have no output in the appended column

Armin’s regex works; attached is it (ever so slightly modified to .+ inside the group) with your sample data.
irynaK’s regex.knwf (5.9 KB)

1 Like

I should have been more clear maybe. I want to EXCLUDE the text in brackets and get the text which is outside of brackets

Then you can use this expression in a “String Manipulation” node:

regexReplace($column1$, "\\(.*\\)", "")

Best,
Armin