string->replaceRegExp
Replaces pattern matches using member syntax.
Target
Signature
1string->replaceRegExp(pattern, replacement)Replaces pattern matches using member syntax.
string->replaceRegExp is called with member syntax on a receiver value. string->replaceRegExp uses the regular-expression surface for pattern matching. Keep patterns small, name the intent in nearby code, and test captures separately from replacement strings.
Parameters
pattern- Required value. Supply
patternpositionally unless the signature shows a keyword form. replacement- Required value. Supply
replacementpositionally unless the signature shows a keyword form.
Examples
Basic call
1'a1 b2'->replaceRegExp('[0-9]', '#')The example shows the normal call shape. Adapt variable names, validation, and surrounding error handling to the context.