I'm having 2 issues with the following. First, some people leave off the "http://" and simply type "www." Secondly, believe it or not some people write their URLS in all caps. What is the best way to address these two issues?use URI; use URI::Find; find_uris($description, sub { my ($find_uri, $orig_uri) = @_; my $uri = URI->new( $orig_uri ); $uri = $uri->canonical->as_string; return '<a href="' . $uri . '" target=_blank>' . $uri . '</a>'; });
In reply to Detecting URLs with URI by htmanning
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |