From 93648f8567ba7978e2c4155c9550704048127271 Mon Sep 17 00:00:00 2001 From: Daniel Lublin Date: Thu, 31 Jan 2019 12:57:33 +0100 Subject: Update URL regex from matcher extension --- url-picker | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/url-picker b/url-picker index c47ee1b..c02bba9 100644 --- a/url-picker +++ b/url-picker @@ -5,12 +5,10 @@ my $url = qr{ (?:https?://|ftp://|news://|mailto:|file://|\bwww\.) - [a-zA-Z0-9\-\@;\/?:&=%\$_.+!*\x27,~#]* - ( - # Allow a pair of matched parentheses - \([a-zA-Z0-9\-\@;\/?:&=%\$_.+!*\x27,~#]*\)| - # exclude some trailing characters (heuristic) - [a-zA-Z0-9\-\@;\/?:&=%\$_+*~] + [\w\-\@;\/?:&=%\$.+!*\x27,~#]* + ( + \([\w\-\@;\/?:&=%\$.+!*\x27,~#]*\)| # Allow a pair of matched parentheses + [\w\-\@;\/?:&=%\$+*~] # exclude some trailing characters (heuristic) )+ }x; -- cgit v1.2.3