From 7a0e1227daf6d62954ad8fe17c0a3a843d87bb59 Mon Sep 17 00:00:00 2001 From: chris mikkelson Date: Thu, 11 Mar 2010 14:53:25 -0600 Subject: [PATCH] Merged text module initialization, updated regexps. --- text.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) 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 = "(?<=