is what I use.s[((\w+://|www\.|WWW\.)[a-zA-Z0-9\.\@:-]+[^\"\'>< \r\t\n]*)] { local $_ = $1; my $scheme = $2; s/// if (my $trailing) = /([.,!?()\[\]]+$)/; s/&(?!\x23?\w+;)/&/g; s/\"/"/g; my $href = ($scheme =~ /www\./i ? "http://$_" : $_); qq{<a href="$href" target="_blank">$_</a>$trailing}; }eg;
Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }
In reply to Re: changing existing text to a link
by Juerd
in thread changing existing text to a link
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |