files/en-us/web/xml/exslt/reference/regexp/replace/index.md
regexp:replace() replaces the portions of a string that match a given regular expression with the contents of another string.
regexp:replace(originalString, regExpString, flagsString, replaceString)
originalString
regExpString
flagsString
replaceString
The character flags are:
g - Global replace
originalString are replaced. Otherwise only the first occurrence is replaced.i - Case insensitive match
The revised version of the string.