Perl Monk, Perl Meditation | |
PerlMonks |
Re: pattern matchingby JediWizard (Deacon) |
on Jul 18, 2005 at 17:18 UTC ( [id://475823]=note: print w/replies, xml ) | Need Help?? |
First: It is really not recomended to use regex to parse htlm (tends to turn into a nightmare). Second: You need to use the s modifier on your regex in order to make . match the newline character. Third: using .+ is greedy, and will match from the first <!-- Start_of_revision--> to the last <!-- End_of_revision--> (which I am sure is not what you want). Forth: The code below is untested
Update: And to get all of them, that if should be a while They say that time changes things, but you actually have to change them yourself. Andy Warhol
In Section
Seekers of Perl Wisdom
|
|