On Fri, 9 Jul 2004 15:17:20 -0400, perl.org wrote
> 
> I need to find all % characters in a string that are not element 
> attributes. for syntax instance:
> 
> <div width="100%">some value%</div>
> 
> I need a regex that matches the % in value% but not in 100% because 
> it is within angle braces.
> 
> Is it possible or more complicated than regex?

Just to make it more fun, sometimes the < and > are encoded as &lt; and &gt; -
I would hope for a regex that ignores both.  I was thinking I could remove the
elements with s#<[^>]+>##g before comparison but I'm not sure how to code the
regex if > might be &gt;.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to