Skip to content

Commit e9d81e6

Browse files
committed
[CodeQuality] Fix escape character on SimplifyRegexPatternRector part 2
1 parent 5b93b4c commit e9d81e6

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

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)