mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-05-31 10:46:27 +00:00
fix regex handeler in pip sep list with multiple capture so $1 is right
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16389 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
8c9f66daae
commit
94d69ee290
@ -153,7 +153,10 @@ SWITCH_DECLARE(void) switch_perform_substitution(switch_regex_t *re, int match_c
|
|||||||
if (num < 0 || num > 256) {
|
if (num < 0 || num > 256) {
|
||||||
num = -1;
|
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) {
|
if (pcre_copy_substring(field_data, ovector, match_count, num, replace, sizeof(replace)) > 0) {
|
||||||
switch_size_t r;
|
switch_size_t r;
|
||||||
for (r = 0; r < strlen(replace); r++) {
|
for (r = 0; r < strlen(replace); r++) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user