summary refs log tree commit diff stats
path: root/src/common/url.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/url.c')
-rw-r--r--src/common/url.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/url.c b/src/common/url.c
index 1f3277cd..f3460aca 100644
--- a/src/common/url.c
+++ b/src/common/url.c
@@ -333,10 +333,10 @@ do_an_re(const char *word,int *start, int *end, int *type)
 }
 
 /*	Miscellaneous description --- */
-#define DOMAIN "[-a-z0-9]+(\\.[-a-z0-9]+)*\\."
-#define TLD "[a-z][-a-z0-9]*[a-z]"
+#define DOMAIN "([a-z0-9]|([a-z0-9][-a-z0-9]*[a-z0-9]))\\."
+#define TLD "([a-z][-a-z0-9]*[a-z0-9])"
 #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})?"
 
 GRegex *