The answer is \W \w stands for any word constituent character. The convention is to have in uppercase the exact complement of the set in lower case.I want to filter a string to get rid of non-word-constituent characters (#,$,@,%, etc.). Can you please tell me how to do it?
Note that if you are a speaker of a language that includes diacritic characters (é,à ,ñ), these characters will be discarded as well.
Code: Select all
put replacetext("aeiouéñß","\W","")
-> result is "aeiou"
Code: Select all
put replacetext("ae$iou%éñß","[#$@%]","")
--> result is "aeiouéñß"
\s stands for any spacing character (space, tab, etc.) \S stands for anything *but* a spacing character.
You can check out my personal notes on regular expressions for more information. There are some extra tutorials at the bottom of that page.