regexp->appendReplacement
Appends a replacement during iterative replacement.
Target
Signature
1regexp->appendReplacement(pattern::string)Appends a replacement during iterative replacement.
regexp->appendReplacement is called with member syntax on a receiver value. regexp->appendReplacement 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 of type
string. Supplypatternpositionally unless the signature shows a keyword form.
Examples
Basic call
1regexp('[0-9]+', '', 'a1')->appendReplacement('#')The example shows the normal call shape. Adapt variable names, validation, and surrounding error handling to the context.