Hi. I have some HTML files with lines like the following:
<a name="w12234"> </a> <h2>A Title</h2>
I'm using a regular expression to find these and capture the name
attribute ("w12234" in the example) and the contents of the h2 tag ("A
Title").
$_ =~ /<a name="(w\d+)">\s*<\/a>\s*<h2>(____+)<\/h2>/
That's my regex, except I'm having trouble with the _____ part. No
matter what I seem to try, it won't match incidences where there's a
newline somewhere in the string. I tried all manner of things,
including [.\n], which if I understand correctly should match
*everything*.
I'm doing this on Windows; does the carriage return/line feed business
have anything to do with this?
Thanks in advance.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>