1
0
mirror of https://github.com/moparisthebest/hexchat synced 2024-11-25 10:42:18 -05:00

Fix DOMAIN and EMAIL patterns.

Closes #1107
This commit is contained in:
LightningW 2014-08-23 17:40:40 +02:00 committed by TingPing
parent fd95c729d5
commit d1b9118056

View File

@ -415,7 +415,7 @@ regex_match (const GRegex *re, const char *word, int *start, int *end)
} }
/* Miscellaneous description --- */ /* Miscellaneous description --- */
#define DOMAIN "[a-z0-9][-a-z0-9]*(\\.[-a-z0-9]+)*" #define DOMAIN "[_a-z0-9][-_a-z0-9]*(\\.[-_a-z0-9]+)*"
#define TLD "\\.[a-z][-a-z0-9]*[a-z]" #define TLD "\\.[a-z][-a-z0-9]*[a-z]"
#define IPADDR "[0-9]{1,3}(\\.[0-9]{1,3}){3}" #define IPADDR "[0-9]{1,3}(\\.[0-9]{1,3}){3}"
#define IPV6GROUP "([0-9a-f]{0,4})" #define IPV6GROUP "([0-9a-f]{0,4})"
@ -610,7 +610,7 @@ re_url (void)
} }
/* EMAIL description --- */ /* EMAIL description --- */
#define EMAIL "[a-z][-_a-z0-9]+@" "(" HOST_URL ")" #define EMAIL "[a-z][._%+-a-z0-9]+@" "(" HOST_URL ")"
static const GRegex * static const GRegex *
re_email (void) re_email (void)