Modified: freeswitch/trunk/src/switch_regex.c (16388 => 16389)
--- freeswitch/trunk/src/switch_regex.c 2010-01-18 17:38:20 UTC (rev 16388)
+++ freeswitch/trunk/src/switch_regex.c 2010-01-18 19:01:56 UTC (rev 16389)
@@ -153,7 +153,10 @@
if (num < 0 || num > 256) {
num = -1;
}
-
+
+ /* make $1 start where it matched in | sep list */
+ num += (match_count-2);
+
if (pcre_copy_substring(field_data, ovector, match_count, num, replace, sizeof(replace)) > 0) {
switch_size_t r;
for (r = 0; r < strlen(replace); r++) {