From a9877f14ddb98778ca786d29d5b4478525085b77 Mon Sep 17 00:00:00 2001 From: Jean-Marie Traissard Date: Fri, 27 Jun 2008 10:50:09 +0000 Subject: [PATCH] [erlehmann] Fixed regular URL matching expressions for "-". --- src/gajim.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gajim.py b/src/gajim.py index 036e8fefe..0a0d63462 100755 --- a/src/gajim.py +++ b/src/gajim.py @@ -2265,10 +2265,10 @@ class Interface: # NOTE: it's ok to catch www.gr such stuff exist! #FIXME: recognize xmpp: and treat it specially + links = r"((?<=\()[A-Za-z][A-Za-z0-9\+\.\-]*:"\ + r"([A-Za-z0-9\.\-_~:/\?#\[\]@!\$&'\(\)\*\+,;=]|%[A-Fa-f0-9]{2})+"\ + r"(?=\)))|([A-Za-z][A-Za-z0-9\+\.\-]*:([A-Za-z0-9\.\-_~:/\?#\[\]@!\$&'\(\)\*\+,;=]|%[A-Fa-f0-9]{2})+)" - links = r"((?<=\()[A-Za-z][A-Za-z0-9+.-]*:"\ - r"([A-Za-z0-9+\.-_~:/\?#\[\]@!\$&'\(\)\*\+,;=]|%[A-Fa-f0-9]{2})+"\ - r"(?=\)))|([A-Za-z][A-Za-z0-9+.-]*:([A-Za-z0-9+\.-_~:/\?#\[\]@!\$&'\(\)\*\+,;=]|%[A-Fa-f0-9]{2})+)" #2nd one: at_least_one_char@at_least_one_char.at_least_one_char mail = r'\bmailto:\S*[^\s\W]|' r'\b\S+@\S+\.\S*[^\s\W]'