Replacing Whole Words Only using @replace
Gerard Usher
Forums
Hi All!
I'm trying to use @ replace to clean up a big Vendor Liost by replacing some common Company Names with "" (essentially removing the bits I don't want).
When I use Add Virtual Charachter and the parameters below, it removes parts of words, as well as whole words. How can I tell IDEA to replace Whole Words Only?
@replace(@replace(@replace(@replace(SUP_NAME, "CO", "" ),"AS", "" ),"AGENCY" , "" ),"AGENCIES" , "" )
In this example above "DALLAS COUNTY AUDITOR" becomes "DALL UNTY AUDITOR"
Use spaces or regular
Use spaces or regular expression (@RegExpr).
@replace(@replace(@replace(@replace(SUP_NAME, " CO ", "" )," AS ", "" )," AGENCY" , "" )," AGENCIES" , "" )