in reply to Re: Trying to avoid line noise (brain cramp)
in thread Trying to avoid line noise (brain cramp)
Allow me to quote from perlman:perlfaq6, Section 1
into this:s{<(?:[^>'"]*|".*?"|'.*?')+>}{}gs;
It's still not quite so clear as prose, but it is very useful for describing the meaning of each part of the pattern.s{ < # opening angle bracket (?: # Non-backreffing grouping paren [^>'"] * # 0 or more things that are neither > nor +' nor " | # or else ".*?" # a section between double quotes (stingy +match) | # or else '.*?' # a section between single quotes (stingy +match) ) + # all occurring one or more times > # closing angle bracket }{}gsx; # replace with nothing, i.e. delete
Again, hope that helps,
Brother Ade
|
|---|