← All docs

mb_ereg_replace()

Replaces multibyte regex matches using numbered and named capture references.

mb_ereg_replace()

function mb_ereg_replace(string $pattern, string $replacement, string $string, ?string $options = null): string|false|null

Replaces multibyte regex matches using numbered and named capture references.

Parameters:

  • $pattern (string)
  • $replacement (string)
  • $string (string)
  • $options (?string), default null, optional

Returns: string|false|null

Availability

No examples yet. Check examples/ and showcases/ for usage patterns.

Internals

For how mb_ereg_replace is implemented in the compiler, see the internals page.