[perl-matcher] add support for unicode in urls

xy abi1789 at googlemail.com
Sat Feb 27 12:28:47 CET 2010


I changed the matcher-extension to support unicode in urls, here is the 
patch:

----------------------- cut ---------------------------
--- matcher    2010-02-09 04:49:51.000000000 +0100
+++ umatcher    2010-02-27 12:07:44.000000000 +0100
@@ -5,10 +5,10 @@
  my $url =
     qr{
        (?:https?://|ftp://|news://|mailto:|file://|\bwww\.)
-      [a-zA-Z0-9\-\@;\/?:&=%\$_.+!*\x27,~#]*
+      [\pL\p{Nd}\-\@;\/?:&=%\$_.+!*\x27,~#]*
        (
-         \([a-zA-Z0-9\-\@;\/?:&=%\$_.+!*\x27,~#]*\)| # Allow a pair of 
matched parentheses
-         [a-zA-Z0-9\-\@;\/?:&=%\$_+*~]  # exclude some trailing 
characters (heuristic)
+         \([\pL\p{Nd}\-\@;\/?:&=%\$_.+!*\x27,~#]*\)| # Allow a pair of 
matched parentheses
+         [\pL\p{Nd}\-\@;\/?:&=%\$_+*~]  # exclude some trailing 
characters (heuristic)
        )+
     }x;
----------------------- cut ---------------------------

Its public domain.


I am not subscribed to this list, so you have to put me in CC.



More information about the rxvt-unicode mailing list