in reply to Re^3: detecting URLs and turning them into links
in thread detecting URLs and turning them into links
My point is only that Regexp::Common does not help with this issue here, because it does not eliminate the trailing punctuation chars (like yours, see today's logs). And it couldn't be differently, because those punctuation chars are allowed in a HTTP URI, so $RE{URI}{HTTP} can't help getting it.use Regexp::Common qw( URI ); $message =~ s#^($RE{URI}{HTTP})#<a href="$1">$1</a>#; $message =~ s#(?<=\s)($RE{URI}{HTTP})#<a href="$1">$1</a>#g;
Flavio
perl -ple'$_=reverse' <<<ti.xittelop@oivalf
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: detecting URLs and turning them into links
by moritz (Cardinal) on Aug 24, 2007 at 09:15 UTC |