On Thu, Jun 07, 2001 at 11:02:54AM -0700, Adrian Pang wrote:
> I'm trying to write a regex expression so it will extract the attribute
> names from a tag. For example,
> <P attr1=3D"hello world" attr2 attr3=3D"hi" attr4>
> The regex should return attr1, attr2, attr3 and attr4
> Is there anyway to write these into one regex expression?
Don't try to parse HTML (or XML) with a regex. Not only are you reinventing
a wheel, you'll probably do it poorly (HTML and XML aren't simple). Use an
actual parser, such as HTML::Parser (or XML::Parser).
Michael
--
Administrator www.shoebox.net
Programmer, System Administrator www.gallanttech.com
--