CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Regular Expressions: Re: [recruiter] PCRE backtracking: Edit Log



Zhris
Enthusiast

May 24, 2014, 2:12 PM


Views: 33443
Re: [recruiter] PCRE backtracking

It could also be done with an "irregular" extended expression (experimental feature). E.g.:


Code
m/^([a-zA-Z]+)(??{my $len = length($1); qr([0-9]{0,$len})})$/


I also noted that there is some information with regards to PCRE support in the Perl regex documentation: http://perldoc.perl.org/perlre.html#PCRE%2fPython-Support

Chris


(This post was edited by Zhris on May 25, 2014, 3:51 PM)


Edit Log:
Post edited by Zhris (Enthusiast) on May 24, 2014, 2:20 PM
Post edited by Zhris (Enthusiast) on May 24, 2014, 2:47 PM
Post edited by Zhris (Enthusiast) on May 24, 2014, 2:47 PM
Post edited by Zhris (Enthusiast) on May 24, 2014, 3:04 PM
Post edited by Zhris (Enthusiast) on May 25, 2014, 3:51 PM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives