From 901c41295ec7ad9fe668efb241af5d686d929bb8 Mon Sep 17 00:00:00 2001 From: Brian West Date: Tue, 11 Dec 2007 03:28:35 +0000 Subject: [PATCH] this wasn't right wrap in paren to get in multi pipe sep regexp. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6620 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_regex.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/switch_regex.c b/src/switch_regex.c index c2d595a22a..c132ee1eb0 100644 --- a/src/switch_regex.c +++ b/src/switch_regex.c @@ -146,12 +146,7 @@ SWITCH_DECLARE(void) switch_perform_substitution(switch_regex_t *re, int match_c } index[z++] = '\0'; z = 0; - if (match_count > 1) { - int offset = match_count - 2; - num = atoi(index) + offset; - } else { - num = atoi(index); - } + num = atoi(index); if (pcre_copy_substring(field_data, ovector, match_count, num, replace, sizeof(replace)) > 0) { switch_size_t r;