in reply to Regex's on Text of HTML (using HTML::Parser)

Instead of HTML::Parser, you might take a look at HTML::TokeParser. I'm currently working on a project using that and it's been a blessing rather than using regular expressions to parse HTML code.

If I understand correctly what you're trying to do, I think HTML::TokeParser may do a better job for you as it breaks everything up in to tokens and you could do your substitutions easily enough and build your HTML back based on your tokens.

Hope that helps!

There is no emoticon for what I'm feeling now.

  • Comment on Re: Regex's on Text of HTML (using HTML::Parser)