(FSCORE-192) expose api for partial regex matching

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9623 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris
2008-09-23 16:05:12 +00:00
parent 221fbdb0f3
commit 870a3ef8ff
2 changed files with 31 additions and 3 deletions
+11
View File
@@ -61,11 +61,22 @@ SWITCH_DECLARE(void) switch_perform_substitution(switch_regex_t *re, int match_c
*/
SWITCH_DECLARE(switch_status_t) switch_regex_match(const char *target, const char *expression);
/*!
\brief Function to evaluate an expression against a string
\param target The string to find a match in
\param expression The regular expression to run against the string
\param partial If non-zero returns SUCCESS if the target is a partial match, on successful return, this is set to non-zero if the match was partial and zero if it was a full match
\return Boolean if a match was found or not
*/
SWITCH_DECLARE(switch_status_t) switch_regex_match_partial(const char *target, const char *expression, int * partial_match);
#define switch_regex_safe_free(re) if (re) {\
switch_regex_free(re);\
re = NULL;\
}
/** @} */
SWITCH_END_EXTERN_C