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
Replace numbers in text document
happy_neid
Member Posts: 10 Contributor I
Hi everybody.
I have some text processing to do, and i am trying to replace all numbers with the word NUMBER. I used operator replace token, but i only sucsseded to replace each figure with that word, not the whole number. For example, 67 is replaced with NUMBERNUMBER, and i want it to ne NUMBER. How to do that?
Tagged:
0
Answers
Hi,
You could transform your document into an Example Set first and use the regular "Replace" operator. Here you can specify a regular expression like "\d+" (without quotes) and replace this with NUMBER. Then you transform this back into a document. This should do the trick...
Hope that helps,
Ingo