Functions

Regex management

Functions

int preg_match (const char *expr, char *str, char ***matches, int *nmatches)
 Check if a string matches a regular expression.

Function Documentation

int preg_match ( const char *  expr,
char *  str,
char ***  matches,
int *  nmatches 
)

Check if a string matches a regular expression.

Parameters:
expr Regular expression to be matched
str String to be checked
matches Reference to a char** that will contain the submatches (NULL if you don't need it)
nmatches Reference to a int containing the number of submatches found (NULL if you don't need it)
Returns:
-1 if the regex is wrong, 0 if no match was found, 1 otherwise
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines