Try this:

_BEGIN_
#!/usr/bin/perl
use warnings;
use strict;
my $html = '<div width="100%">some value%</div>';
$html =~ /(?:\<.+\>)?(.+\%)(?:\<.+\>)?/;
print $1;
_END_

HTH,

Rod

--- Wiggins d Anconia <[EMAIL PROTECTED]> wrote:
> > Hello,
> > 
> > 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?



                
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

-- 
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