Scripting > UNICOM Intelligence Function Library > Text functions > RegExReplace
 
RegExReplace
Returns a string formed by replacing the substrings that are matched by the regular expression in the string Val with another string.
Syntax
RegexReplace (Val, RegexExpression, Replacement [, IgnoreCase])
Parameters
Val
Type: Text
The text to be searched.
RegExExpression
Type: Text
The regular expression.
Replacement
Type: Text
The text that will be used for replacement.
IgnoreCase
Type: Boolean
Optional. The default value is False.
Remarks
ICU string types are not currently supported. For more information, see “Working With Unicode and ICU String Types”:
http://boost.sourceforge.net/libs/regex/doc/icu_strings.html
Example
The following mrScriptBasic example uses the RegExFind function to replace all digits in a text variable with asterisk characters:
strVal = strVal.RegexReplace("\d", "*")
See also
Text functions