From fcc501baed039aaa12d457cf8bd1fcf21cd6b9e1 Mon Sep 17 00:00:00 2001 From: Sergey Lyubka Date: Thu, 10 Mar 2016 09:46:23 +0000 Subject: [PATCH] Update unit_test.c --- unit_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unit_test.c b/unit_test.c index 077aeb3..ed5ca2f 100644 --- a/unit_test.c +++ b/unit_test.c @@ -255,12 +255,12 @@ int main(void) { " " " some link"; - static const char *regex = "(?i)((https?://)[^\\s/'\"<>]+/?[^\\s'\"<>]*)"; + static const char *regex = "((https?://)[^\\s/'\"<>]+/?[^\\s'\"<>]*)"; struct slre_cap caps[2]; int i, j = 0, str_len = (int) strlen(str); while (j < str_len && - (i = slre_match(regex, str + j, str_len - j, caps, 2, 0)) > 0) { + (i = slre_match(regex, str + j, str_len - j, caps, 2, SLRE_IGNORE_CASE)) > 0) { printf("Found URL: [%.*s]\n", caps[0].len, caps[0].ptr); j += i; }