Using Regular Expressions to replace
Hello,
Is there a way to use regular expressions to search and replace?
1 reply
-
Hi
Not directly in the Replace block. As you illustrate, you can use Regular Expressions to search for strings, but not use them to replace.
You might be able to construct what you need using a general Calculate Column block and make use of the Replace() function in conjunction with the FindByPattern() function which lets you use Regular Expressions as part of your calculation.
Something like:
Replace([Text Field},FindByPattern([Text Field],<regex expression>),FindByPattern([Text Field],<regex expression>))
Where the first FindByPattern returns the string to look for in [Text Field] and the second FindByPattern returns the string to replace it with in [Text Field].
Hope that helps.
Ian