Could someone please show me how to use some simple RegEx to do the following please:
"String with spaces, punctuation; and numbers (22)" -> "Stringwithspacespunctuationandnumbers22"
The only characters I want to retain are letters a-z (case doesn't matter) and numbers 0 to 9. I'm working with web services that don't like punctuation, but I don't want to code string values with a generic recordID because I still want the results to be readable.
Basically, anything that isn't a to z or 0 to 9 can just be thrown away. I this easy to do? Thanks
Solved! Go to Solution.
Regex tool
Method: replace
Pattern: \W
Replacement text: leave it blank
Oh wow that was easy! I didn't even know there was a Regex tool, I thought I'd have to mess around with a function in a formula or filter. That makes life much easier! Thank you
Hi @jt_edin and others reading this thread who may not be familiar with RegEX, the "Data Cleansing" tool will accomplish the same thing too! Just check the "Punctuation" box under the "Remove Unwanted Characters" section.
-AndréB
Data Cleansing tool does not accomplish the exact same thing in all cases. For this example - yes. But if there are some other special characters present it does not remove them.