Skip to main content

I have a field that contains values with parentheses, like (0601310951181134359628), and I would like to remove them. The parentheses always appear once at the beginning and once at the end of the field.

I am currently able to achieve this using two StringReplacer transformers, each removing one parenthesis. However, I would like to do it in one step. I tried the recommended regex expressions from previous posts, but none of them worked.

Any suggestions?

You can try this:

It will remove any paranthesis (open or close) wherever inside “my_field”.

Here’s the regex for copy-paste purposes:

\(|\)


You have to escape the parantheses. This works:

\(|\)

Search for ( or ). Replace with nothing.

Note that this will replace every ( and )


If you want to only remove parenthesis at the beginning and end of the string, and not inside the string: