- or download this
http://www.google.com
<a href="http://www.google.com">fail a match here</a>
- or download this
<a href="http://www.google.com">http://www.google.com</a>
<a href="http://www.google.com">fail a match here</a>
- or download this
my $text = qq~
http://www.google.com
...
$text =~ s#(http://[^\s]*)(?!["|<])#<a href="$1">$1</a>#gsi;
print $text;
- or download this
s#[^">](http://[\S]*)# <a href="$1">$1</a>#gsi;