diff --git a/rules/CodeQuality/Rector/FuncCall/SimplifyRegexPatternRector.php b/rules/CodeQuality/Rector/FuncCall/SimplifyRegexPatternRector.php index 4e599aa2fd6..109bfe54b92 100644 --- a/rules/CodeQuality/Rector/FuncCall/SimplifyRegexPatternRector.php +++ b/rules/CodeQuality/Rector/FuncCall/SimplifyRegexPatternRector.php @@ -21,12 +21,12 @@ final class SimplifyRegexPatternRector extends AbstractRector * @var array */ private const COMPLEX_PATTERN_TO_SIMPLE = [ - '[0-9]' => '\\d', - '[a-zA-Z0-9_]' => '\\w', - '[A-Za-z0-9_]' => '\\w', - '[0-9a-zA-Z_]' => '\\w', - '[0-9A-Za-z_]' => '\\w', - '[\r\n\t\f\v ]' => '\\s', + '[0-9]' => '\\\d', + '[a-zA-Z0-9_]' => '\\\w', + '[A-Za-z0-9_]' => '\\\w', + '[0-9a-zA-Z_]' => '\\\w', + '[0-9A-Za-z_]' => '\\\w', + '[\r\n\t\f\v ]' => '\\\s', ]; public function __construct(