regexp->replaceAll

Replaces all matches.

Target member

Signature

1regexp->replaceAll(replace::string)

Replaces all matches.

regexp->replaceAll is called with member syntax on a receiver value. regexp->replaceAll 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

replace
Required value of type string. Supply replace positionally unless the signature shows a keyword form.

Examples

Basic call

1regexp('[0-9]+', '', 'a1b2')->replaceAll('#')
The example shows the normal call shape. Adapt variable names, validation, and surrounding error handling to the context.