Fix DOMAIN and TLD per rfc 1738, thanks Arnavion
This commit is contained in:
parent
be2d100d2d
commit
d5fbea3411
@ -333,10 +333,10 @@ do_an_re(const char *word,int *start, int *end, int *type)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Miscellaneous description --- */
|
/* Miscellaneous description --- */
|
||||||
#define DOMAIN "[-a-z0-9]+(\\.[-a-z0-9]+)*\\."
|
#define DOMAIN "([a-z0-9]|([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-z0-9])"
|
||||||
#define IPADDR "[0-9]+(\\.[0-9]+){3}"
|
#define IPADDR "[0-9]+(\\.[0-9]+){3}"
|
||||||
#define HOST "(" DOMAIN TLD "|" IPADDR ")"
|
#define HOST "(" "(" "(" DOMAIN ")*" TLD ")" "|" IPADDR ")"
|
||||||
#define OPT_PORT "(:[1-9][0-9]{0,4})?"
|
#define OPT_PORT "(:[1-9][0-9]{0,4})?"
|
||||||
|
|
||||||
GRegex *
|
GRegex *
|
||||||
|
Loading…
Reference in New Issue
Block a user