On Dec 27, Papo Napolitano said:
>/\<(br|b|\/b|a\s.*?|\/a|p|\/p)\>/
>
>Now, how do I negate it?
Using a negative look-ahead:
m{<(?!br?|a\s|p|/[bap])(.*?)>}
$1 will hold something other than "br", "b", "a ...", "p", "/b", "/a", or
"/p".
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] htt
Same thing but use the !~ operator instead of =~.
using
/\<(br|b|\/b|a\s.*?|\/a|p|\/p)\>/;
is the same as
$_ =~ /\<(br|b|\/b|a\s.*?|\/a|p|\/p)\>/;
To get a true answer only when the string do not match your regex, you need to do:
$_ !~ /\<(br|b|\/b|a\s.*?|\/a|p|\/p)\>