in reply to Regexps to change HTML tags/attributes
As for the regexes, the first pattern will not do the right thing if there's another tag at the same line. The second pattern will fail to do the right thing if the anchor has another attribute before "HREF", or if it has an attribute value containing a ">".
You would be far better off using one of the many HTML parsing modules found on CPAN.
Abigail
|
|---|