[erlehmann] Fixed regular URL matching expressions for "-".

This commit is contained in:
Jean-Marie Traissard 2008-06-27 10:50:09 +00:00
parent 65ec746e4f
commit a9877f14dd
1 changed files with 3 additions and 3 deletions

View File

@ -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]'