How can I match "foo", only if it's not between "<textarea" & "</textarea"?

I tried "s/(<textarea){0}.*foo/bar/" & "s/(?<!<textarea.*)foo/bar/"

The former expression always matches "foo", even after "<textarea" (presumably because ".*" matches an arbitrary string which isn't preceded by "<textarea").

The later expression never matched "foo", even without "<textarea" anywhere in the string. Lookback doesn't seem to like the ".*"?

Can anyone suggest an expression that might work?

Thanks!

Jack


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