in reply to Re^4: detecting URLs and turning them into links
in thread detecting URLs and turning them into links

You are absolutely right about the punctuation. In my use case it just appears virtually never (unless you test it ;-)

I might consider using a negative lookbehind for punctuation, like so:

use strict; use warnings; use Regexp::Common qw/URI/; my $text = 'http://perl-6.de/,'; if ($text =~ m/($RE{URI}{HTTP}(?<![.,]))/){ print "Match: $1\n"; } __END__ # Output: Match: http://perl-6.de/

I think I'll add this to my CGI scripts as soon as I have write access to the repository again.