in reply to Re^3: POD style regex for inline HTML elements
in thread POD style regex for inline HTML elements
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.
So solution is simple, on any computer you have, get the old version, print out the pattern and save it to a file
cpanm -n http://cpan.metacpan.org/authors/id/A/AB/ABIGAIL/Regexp-Common-2011121001.tar.gz
$ perl -MRegexp::Common -le " print $RE{balanced}{-parens=>'<>'} " (?^:(?^:(?:\<(?:(?>[^\<\>]+)|(??{$Regexp::Common::balanced [0]}))*\>)) +)
So to inline into above program you'd write something like
use vars qw/ $re_balanced_angles /; our $re_balanced_angles = qr{(?^:(?^:(?:\<(?:(?>[^\<\>]+)|(??{ $re_bal +anced_angles }))*\>)))}; ... m{ ### no more ## \G( $allowed )( $RE{balanced}{-parens=>'<>'} ) \G( $allowed )( $re_balanced_angles ) }gcsx and do {
Or downgrade the version of Regexp::Common you upload to your website
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: POD style regex for inline HTML elements
by Lady_Aleena (Priest) on May 16, 2014 at 22:27 UTC | |
by Anonymous Monk on May 17, 2014 at 02:57 UTC | |
by Lady_Aleena (Priest) on May 17, 2014 at 23:51 UTC | |
by Anonymous Monk on May 18, 2014 at 02:38 UTC | |
by Anonymous Monk on Jun 02, 2014 at 09:29 UTC |