regexp->replacePattern
Returns the replacement pattern.
Target
Signature
1regexp->replacePattern()Returns the replacement pattern.
regexp->replacePattern is called with member syntax on a receiver value. regexp->replacePattern uses the regular-expression surface for pattern matching. Keep patterns small, name the intent in nearby code, and test captures separately from replacement strings.
Examples
Basic call
1regexp('[a-z]+', 'x')->replacePatternThe example shows the normal call shape. Adapt variable names, validation, and surrounding error handling to the context.