mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 21:22:09 +00:00
(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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user