raghuprasad241 has asked for the wisdom of the Perl Monks concerning the following question:
$np = qr{ \( (?: (?> [^()]+ ) # Non–parens without backtracking | (??{ $np }) # Group with matching parens )* \) }x;
$funpat = qr/\w+$np/;<br> "myfunfun(1,(2*(3+4)),5)" =~ /^$funpat$/; #Matches!"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Recursive regex
by LanX (Saint) on Feb 05, 2016 at 18:16 UTC | |
|
Re: Recursive regex
by AnomalousMonk (Archbishop) on Feb 05, 2016 at 18:14 UTC | |
|
Re: Recursive regex
by Laurent_R (Canon) on Feb 05, 2016 at 18:01 UTC | |
|
Re: Recursive regex
by raghuprasad241 (Beadle) on Feb 05, 2016 at 19:17 UTC |