in reply to url to html regex problem

How about using URI::Find instead? No point re-solving that problem. It even includes an example of what you're trying to do:
Wrap each URI found in an HTML anchor. my $finder = URI::Find->new( sub { my($uri, $orig_uri) = @_; return qq|<a href="$uri">$orig_uri</ +a>|; }); $finder->find(\$text);
Although that code is wrong. He needs to HTML-entitize the href parameter. Bleh. Here's the corrected code:
use CGI qw(escapeHTML); my $finder = URI::Find->new( sub { my($uri, $orig_uri) = @_; $_ = escapeHTML("$_") for $uri, $ori +g_uri; return qq|<a href="$uri">$orig_uri</ +a>|; }); $finder->find(\$text);
I just sent the author a bug report.

-- Randal L. Schwartz, Perl hacker