We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d922d0 commit 4762aedCopy full SHA for 4762aed
src/JS.php
@@ -238,7 +238,7 @@ protected function extractRegex()
238
// closing the regex)
239
// then also ignore bare `/` inside `[]`, where they don't need to be
240
// escaped: anything inside `[]` can be ignored safely
241
- $pattern = '\\/(?:[^\\[\\/\\\\\n\r]+|(?:\\\\.)+|(?:\\[(?:[^\\]\\\\\n\r]+|(?:\\\\.)+)+\\])+)++\\/[gimuy]*';
+ $pattern = '\\/(?!\*)(?:[^\\[\\/\\\\\n\r]++|(?:\\\\.)++|(?:\\[(?:[^\\]\\\\\n\r]++|(?:\\\\.)++)++\\])++)++\\/[gimuy]*';
242
243
// a regular expression can only be followed by a few operators or some
244
// of the RegExp methods (a `\` followed by a variable or value is
0 commit comments