Problems? Is your data what you think it is? | |
PerlMonks |
Re: Lookahead assertion confusionby Enlil (Parson) |
on Jan 10, 2003 at 21:08 UTC ( [id://225957]=note: print w/replies, xml ) | Need Help?? |
Let's break this down and see if you can't find the problem:
1. the pattern must start with <p> followed by a space 2. afterwhich the pattern must grab as much as it can provided that #3 is statisfied and that whatever .+ matches cannot be followed by <p>. 3. the pattern has to end with features: <ul> all this is case insensitive. so if you look at it once more you realize that nowhere is rule #2 broken as it is not followed by a <p> what you are looking for is more along these lines:my ($first, $second, $third) = ($test =~ /(<p> ).+?<p>(.+)(features: <ul>)/i); update:being human, I assosciate significance to big round numbers in a, more often times than not, strange superstitious manner. and thus i mark post 100 -enlil
In Section
Seekers of Perl Wisdom
|
|