Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
(?<CV>\$*\w++\s*)\s*\((\s*(?<PRM>(\g<0>)|(?<STRING>"(?:[^"\\]*(?:\\.[^"\\]*)*)"|'(?:[^'\\]*(?:\\.[^'\\]*)*)')|(\g<CV>))\s*(,\s*(\g<PRM>))*)?+\s*\)
/
gm
Input 1
1
New
bar("string"",bar($str,CONST,func($s,o))) //1 bar("string\",bar($str,CONST,func($s,o))) //2 bar("",bar($str,CONST,func($s,o))) //This regex is supported, but when I try to be compatible with both cases, the problem occurs
Extraction