RegexReplace
Less than 1 minute
RegexReplace
Replace part of a string with another string using a regular expression.
class RegexReplaceMethods
run
public run(string $string, string $pattern = '//', string $replacement): stringReturns: string
Parameters
| Parameter | Type | Description |
|---|---|---|
$string | string | The input string |
$pattern | string | The pattern to search for |
$replacement | string | The replacement string |
Generated by Hazaar API Doc Generator on Thu, 22 Oct 2026 05:05:28 +0000