Re: regular expression help

2006-07-24 Thread Jonathan Weber
On 24 Jul 2006, at 5:48 PM, Rob Dixon wrote: - The character wildcard '.' is just a dot within a character class, so [.\n] will match only a dot or a newline Ah, I hadn't realized that characters in [ ] are literals. That clears up a lot of the problem. - Regexes aren't the best way of p

regular expression help

2006-07-24 Thread Jonathan Weber
Hi. I have some HTML files with lines like the following: A Title 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"). $_ =~ /\s*<\/a>\s*(+)<\/h2>/ That's my regex, except I'm having trouble with