cancel
Showing results for 
Search instead for 
Did you mean: 

regular expression to remove parenthesis in Paxata

H369199
NiCd Battery

Hi all,

I want to replace with left and right parenthesis with space using regexp in Paxata. 

Input : BB(HG)CD

Output : BB HG CD

 

Thanks,

Praveen

Labels (1)
0 Kudos
1 Reply
calamari
DataRobot Employee
DataRobot Employee

Hello @H369199 ! You can absolutely use a regular expression to do that, but I would suggest using a simple find and replace on the column. I will show both ways below:

1) Find and Replace (recommended):

Step 1 - On the column you want to replace the parenthesis on, go to the drop down menu and select "find + replace":

calamari_2-1608083230929.png

Step 2 - Enter the two values you want to replace, and add the space to what you want to replace it with, (note there is a plus symbol + to add another find + replace criteria):

calamari_3-1608083439395.png

 

2) Regular Expression (one of my favourite quotes - when you solve a problem with a regular expression you now have two problems  

You would create a new computed column, and use the formula:

REGEXP(@Input@,"\\(|\\)", " ")

Screenshots below:

calamari_0-1608083065136.png

calamari_1-1608083090453.png

 

I hope this helps.

Callum