The Altair Community and the RapidMiner community is on read-only mode until further notice. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here.
Options
How to remove characters from end of string using regular expression within Replace operator?
![User118722](https://us.v-cdn.net/6030995/uploads/defaultavatar/nCCNNSPK1YM69.jpg)
![](https://s3.amazonaws.com/rapidminer.community/vanilla-rank-images/contributor-16x16.png )
in Help
Hi,
I'm trying to remove certain characters from the end of string in a text field using Replace operator, for example,
Current value: abcd(xxx)
Desired value: abcd
In the replace operator, I use the following regular expression to locate strings end with (xxx), but what should I put in as Replacement?
(.*)(?:abc)(.*)
Thank you!
I'm trying to remove certain characters from the end of string in a text field using Replace operator, for example,
Current value: abcd(xxx)
Desired value: abcd
In the replace operator, I use the following regular expression to locate strings end with (xxx), but what should I put in as Replacement?
(.*)(?:abc)(.*)
Thank you!
1
Answers
Read as start from the beginning (^) , grab what you need, ignore everything else till the end ($)
But your example is very confusing so I may misunderstand you. Do you have a more real live example?