replaceMatches
replaceMatches()
Section titled “replaceMatches()”Category: String
Returns the input string with all matches of the regex pattern replaced with the replacement string
Signature
Section titled “Signature”- Return type:
string - Parameters:
regexstring— Regular expression pattern to matchreplacementstring— Replacement string
Examples
Section titled “Examples”'Hello 123 World 456'.replaceMatches('[0-9]+', 'XXX')Patient.name.text.replaceMatches('\s+', ' ')