in reply to Regexp: Match anything except a certain word
$_ = join '', <DATA>; s/(<a href="https?:\/\/(?:(?!target=).)*?)>/$1 target="_blank">/igs; print; __DATA__ <a href="dsfsdf">sdfdsf</a> <a href="http://dsfsdf">sdfdsf</a> <a href="https://dsfsdf">sdfdsf</a> <a href="http://dsfsdf" target="_blank">sdfdsf</a> <a href="http://dsfsdf" >sdfdsf</a>
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Regexp: Match anything except a certain word
by ikegami (Patriarch) on Apr 21, 2006 at 19:23 UTC |