string.replace.regex

Syntax

snew = string.replace.regex(source,sreg,srep)

Replaces anything that matches the regular expression sreg in string source with the contents of srep, and returns the new string.

Returns:

snew - The new string after the replacement.

Arguments:

source - The string to scan for matches to sreg. sreg - The regular expressed used to find a match. srep - The string used to replace the contents that match sreg.