![]() |
|
Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: substitution onby Taulmarill (Deacon) |
on Aug 24, 2009 at 17:09 UTC ( #790868=note: print w/replies, xml ) | Need Help?? |
If you want to replace < with < where it is not part of an HTML tag, a simple solution would be using negative look ahead in your regex like this: s/<(?![^<]*>)/</g; A better solution would be using some HTML parsing module from CPAN.
In Section
Seekers of Perl Wisdom
|
|