No. A few cases where it will not work (assuming
*.?
was just a typo for
.*?):
- Lower case letters for name of tag or attribute.
- Newline between the tag name and the attribute.
- Whitespace around the =.
- Attribute value not quoted, or single quote quoted.
- <A NAME = "HREF=">.
- <A NAME = "FOO">Blah</A> <A HREF = "fnord.html"> ....
- <IMG SRC = "math.gif" ALT = "B<A"> ... HREF="foo".
Since perl 5.6.0, you can parse HTML with a regex. But it's
not going to be a simple one, and you are better off using a
real parser.
Abigail