Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone
is it possible to create a java routines which can replace regex instead of using the tReplace component?
Example: There is a table which contains product column and product_description column.
This description also includes the words "do not offer" in different kinds like:
DO NOT OFFER, Do Not Offer, Do NOT Offer, don't offer, DON'T OFFER and some other writings.
Now those words have to replace by an empty space.
Is there an easy way to replace all different writings?
Thanks for any information.
Hi,
"Easy way", not sure but you can of course create a routine with a method that will remove all possible occurences of your list.
Please note that you can easily make a regex case unsensitive by adding "(?i)" at the beginning.
For example this :
"nice product Do NoT OfFeR to client".replaceAll("(?i)do not offer","")
will return that :
nice product to client
Of course, it's not very clean and you'll have to ajust every time you see a new variation...
Regards