RegEx::Replace (open)
Replace every occurrence of a regular expression
Syntax
LOADLIB "wh::regex.whlib";
STRING FUNCTION Replace(STRING input, STRING replacewith)Parameters
STRING inputInput to do the replace in
STRING replacewithFormat string to replace every occurance with
Return value
STRINGInput with every occurance of the regular expression replaced
Description
This function can be used to find every occurence of a regular expression within a string, and replace it with another string. If the global flag was set on the regular expression, the callback is only called for the first match.