From c71160664052db5f56bbdb17ae59f0f6be284a05 Mon Sep 17 00:00:00 2001 From: progandy Date: Wed, 27 Feb 2013 16:38:48 +0100 Subject: [PATCH] better url recognition, less mismatches --- menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/menu.c b/menu.c index 9390f0c..889a3ce 100644 --- a/menu.c +++ b/menu.c @@ -27,7 +27,7 @@ char *extract_urls(const char *to_match) if (!is_initialized) { char *regex = - "((http|ftp|https)(://))?(www\\.)?[[:alnum:]_-]+\\.[^[:space:]]+"; + "((http|ftp|https)(://))?(www\\.)?[[:alnum:]_-]+\\.[^[:space:]\"<>]{2,}"; int ret = regcomp(&cregex, regex, REG_EXTENDED | REG_ICASE); if (ret != 0) { printf("failed to compile regex\n");