Think about Loose Coupling | |
PerlMonks |
Re: pattern match of first occuranceby johngg (Canon) |
on Jul 08, 2010 at 10:41 UTC ( [id://848670]=note: print w/replies, xml ) | Need Help?? |
Your match (.+) is greedy so it will match as much as possible, i.e. up to the second </year>. Make it non-greedy with the addition of a question mark.
I hope this is helpful. Cheers, JohnGG
In Section
Seekers of Perl Wisdom
|
|