Skip to content

Commit

Permalink
README: simplify fuzzy classname regex (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
janedbal authored Jan 10, 2024
1 parent 020adaa commit 87043e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ $classNameRegex = '[a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*'; // https://www.php
$dicFileContents = file_get_contents(__DIR__ . '/config/services.yaml');

preg_match_all(
"~($classNameRegex\\\\$classNameRegex(?:\\\\$classNameRegex)*)~", // at least one backslash
"~$classNameRegex(?:\\\\$classNameRegex)+~", // at least one backslash
$dicFileContents,
$matches
); // or parse the yaml properly
Expand Down

0 comments on commit 87043e8

Please sign in to comment.