aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Lublin <daniel@lublin.se>2019-01-31 12:57:33 +0100
committerDaniel Lublin <daniel@lublin.se>2019-01-31 12:57:33 +0100
commit93648f8567ba7978e2c4155c9550704048127271 (patch)
treee61aa02db31fe7404b2e7d6400b7810d874817fd
parentfd4a07c22f225a6b58385e80552075d9168fd61a (diff)
Update URL regex from matcher extension
-rw-r--r--url-picker10
1 files 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;