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.
"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...
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Watch the recorded webinar!
Learn how to do cool things with Context Variables
Find out how to migrate from one database to another using the Dynamic schema
Pick up some tips and tricks with Context Variables