regexReplace

Replaces all occurrences of $pattern in $str by $replacement.

Description

static regexReplace(string $pattern, string $replacement, string $options)

Parameters

  • string $pattern
    The regular expression pattern.

  • string $replacement
    The string to replace with.

  • string $options
    Matching conditions to be used.

Return Value

static
Resulting string after the replacements