microregex.h File Reference
Go to the source code of this file.
Typedef Documentation
Function Documentation
Create regular expression object.
- Parameters:
-
| regex | The regular expression to parse. |
- Returns:
- The created regular expression object.
Destroy regular expression object.
- Parameters:
-
| regex_obj | The regular expression object to destroy. |
Match text based on given regex.
- Parameters:
-
| regex_obj | The regular expression object to use. |
| str | The string in which to find the given regex. |
| start | Starting index inside string |
- Returns:
- A match object with specified match info.
void microregex_set_case_insensitivity |
( |
microregex_t |
regex_obj, |
|
|
int |
val | |
|
) |
| | |
Set case insensitivity of regular expression.
- Parameters:
-
| regex_obj | The regular expression object to edit. |
| val | Value to set flag to. |
Destroys state object.
- Parameters:
-
| st | Pointer to state object to destroy. |
Get the location of the match
- Parameters:
-
| st | The state object to use. |
- Returns:
- The location of the match.
Get the number of substrings captured by parenthesis.
- Parameters:
-
| st | The state object to use. |
- Returns:
- The number of subexpressions captured by this match.
Get the substring captured by parenthesis
- Parameters:
-
| st | The state object to use. |
| n | The subexpression number (0 = entire match) |
- Returns:
- The string captured by the subexpression.