update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6255 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
c5e0348f63
commit
013096b853
|
@ -68,12 +68,14 @@ SWITCH_DECLARE(int) switch_regex_perform(const char *field, const char *expressi
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (*expression == '/' && *(expression + (strlen(expression) - 1)) == '/') {
|
||||
if (*expression == '/') {
|
||||
char *opts = NULL;
|
||||
tmp = strdup(expression + 1);
|
||||
assert(tmp);
|
||||
if ((opts = strrchr(tmp, '/'))) {
|
||||
*opts++ = '\0';
|
||||
} else {
|
||||
goto end;
|
||||
}
|
||||
expression = tmp;
|
||||
if (opts) {
|
||||
|
@ -86,6 +88,7 @@ SWITCH_DECLARE(int) switch_regex_perform(const char *field, const char *expressi
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
re = pcre_compile(expression, /* the pattern */
|
||||
flags, /* default options */
|
||||
&error, /* for error message */
|
||||
|
|
Loading…
Reference in New Issue