|
|
| more useful options | |
| PerlMonks |
Re: hepl with a regex problemby moxliukas (Curate) |
| on Jun 04, 2003 at 23:27 UTC ( #263178=note: print w/ replies, xml ) | Need Help?? |
|
The first thing you should try is "non-greedy" regular expression match. "Non-greedy" means "match as little as possible" and all you need to change is to add a question mark: /.*Volume<br>(.*?)<\/font><\/td>.*/Hope this helps Update: reading Juerd's answer I am starting to think that possibly I have misinterpreted the question ;) So yes, if you are having problems extracting the match, it is in $1. If you are just having a problem of something matching too much -- a greedy regexp may be to blame. As far as I can remember it took me days to understand greedy/non-greedy regexps when I started learning Perl ;)
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||