Skip to content

Commit 1bec85f

Browse files
authored
[CodeQuality] Fix escape character on SimplifyRegexPatternRector part 2 (#7391)
1 parent 5b93b4c commit 1bec85f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

rules/CodeQuality/Rector/FuncCall/SimplifyRegexPatternRector.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ final class SimplifyRegexPatternRector extends AbstractRector
2121
* @var array<string, string>
2222
*/
2323
private const COMPLEX_PATTERN_TO_SIMPLE = [
24-
'[0-9]' => '\\d',
25-
'[a-zA-Z0-9_]' => '\\w',
26-
'[A-Za-z0-9_]' => '\\w',
27-
'[0-9a-zA-Z_]' => '\\w',
28-
'[0-9A-Za-z_]' => '\\w',
29-
'[\r\n\t\f\v ]' => '\\s',
24+
'[0-9]' => '\\\d',
25+
'[a-zA-Z0-9_]' => '\\\w',
26+
'[A-Za-z0-9_]' => '\\\w',
27+
'[0-9a-zA-Z_]' => '\\\w',
28+
'[0-9A-Za-z_]' => '\\\w',
29+
'[\r\n\t\f\v ]' => '\\\s',
3030
];
3131

3232
public function __construct(

0 commit comments

Comments
 (0)