- or download this
Version 2013030901 Sat Mar 9 14:51:42 CET 2013
+ Use (?-1) instead of (??{ }) for the recursive balanced pattern.
This makes the pattern unavailable for pre-5.010 perls.
- or download this
$ perl -MRegexp::Common -le " print $RE{balanced}{-parens=>'<>'} "
(?^:(?^:(?:\<(?:(?>[^\<\>]+)|(??{$Regexp::Common::balanced [0]}))*\>))
+)
- or download this
use vars qw/ $re_balanced_angles /;
our $re_balanced_angles = qr{(?^:(?^:(?:\<(?:(?>[^\<\>]+)|(??{ $re_bal
+anced_angles }))*\>)))};
...
\G( $allowed )( $re_balanced_angles )
}gcsx and do {