From: chris mikkelson Date: Thu, 11 Mar 2010 20:53:25 +0000 (-0600) Subject: Merged text module initialization, updated regexps. X-Git-Url: https://git.mikk.net/?a=commitdiff_plain;h=7a0e1227daf6d62954ad8fe17c0a3a843d87bb59;p=liburl Merged text module initialization, updated regexps. --- diff --git a/text.c b/text.c index 19f39d6..8c77eb2 100644 --- a/text.c +++ b/text.c @@ -4,30 +4,31 @@ */ #include +#include #include "re_stream.h" #include "msgproc.h" -static const char *text_url_pattern = "https?://\\S+"; +static const char *text_url_pattern = "https?://[^\\s]+(?=\\s|$|\\))"; static pcre *text_url_re; -static const char *html_url_pattern = "<(a href|img src)=\"https?://[^\"]+"; +static const char *html_url_pattern = "(?<=