From 434351dcc204323e7e60eacb8a3dd013cf6b6dc1 Mon Sep 17 00:00:00 2001 From: russell Date: Tue, 21 Mar 2006 17:45:56 +0000 Subject: fix REGEX on strings that contain quotes (issue #6678) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@13925 f38db490-d61c-443f-a65b-d21fe96a405b --- funcs/func_strings.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/funcs/func_strings.c b/funcs/func_strings.c index 503611bbe..27c457dd4 100644 --- a/funcs/func_strings.c +++ b/funcs/func_strings.c @@ -89,10 +89,9 @@ static char *builtin_function_regex(struct ast_channel *chan, char *cmd, char *d /* Regex in quotes */ arg = strchr(tmp, '"'); if (arg) { - arg++; - earg = strrchr(arg, '"'); + earg = ++arg; + strsep(&earg, "\""); if (earg) { - *earg++ = '\0'; /* Skip over any spaces before the data we are checking */ while (*earg == ' ') earg++; -- cgit v1.2.3