The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
How to remove characters from end of string using regular expression within Replace operator?
User118722
Member Posts: 3 Contributor I
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?