1 | #! perl |
1 | #! perl |
2 | |
2 | |
3 | # same url as used in "selection" |
3 | # same url as used in "selection" |
4 | my $url = |
4 | my $url = |
5 | qr{( |
5 | qr{( |
6 | (?:https?|ftp|news|mailto|file)://[ab-zA-Z0-9\-\@;\/?:&=%\$_.+!*\x27(),]+ |
6 | (?:https?|ftp|news|mailto|file)://[ab-zA-Z0-9\-\@;\/?:&=%\$_.+!*\x27(),~]+ |
7 | [^.] # do not include a trailing dot, its wrong too often |
7 | [ab-zA-Z0-9\-\@;\/?:&=%\$_+!*\x27(),~] # do not include a trailing dot, its wrong too often |
8 | )}x; |
8 | )}x; |
9 | |
9 | |
10 | sub on_add_lines { |
10 | sub on_add_lines { |
11 | my ($term, $str) = @_; |
11 | my ($term, $str) = @_; |
12 | |
12 | |