Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^5: Using Look-ahead and Look-behind

by Anonymous Monk
on Oct 15, 2012 at 15:28 UTC ( #999104=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Using Look-ahead and Look-behind
in thread Using Look-ahead and Look-behind

Great, please take it to Seekers Of Perl Wisdom, see Re^2: Using Look-ahead and Look-behind

You forgot to include sample input, no matter, here are clues, run these and compare

perl -Mre=debug -le " $_ = q/foobarfoodrinkAATT/; /foo((?:(?!bar).){1, +5}?)AATT/; "

perl -Mre=debug -le " $_ = q/foobarfoodrinkAATTAATT/; /foo((?:(?!bar). +){6,10}?)AATT/; "

50,100 means match at minimum 50 but no more than 100

.* means match at least zero times

in my short example, first AATT appears at 6, so it is included in the match


Comment on Re^5: Using Look-ahead and Look-behind
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://999104]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (9)
As of 2015-07-07 05:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (87 votes), past polls