#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <limits.h>
#include "microregex_internal.h"
Typedefs | |
typedef void(* | state_machine_func_t )(microregex_state_t *, microregex_state_t, char *, char *) |
Functions | |
void | microregex_state_destroy (microregex_state_t *st) |
microregex_state_t | microregex_match (microregex_t regex_obj, char *str, int start) |
int | microregex_state_get_num_captured (microregex_state_t st) |
char * | microregex_state_get_subexpression (microregex_state_t st, int n) |
typedef void(* state_machine_func_t)(microregex_state_t *, microregex_state_t, char *, char *) |
microregex_state_t microregex_match | ( | microregex_t | regex_obj, | |
char * | str, | |||
int | start | |||
) |
Match text based on given regex.
regex_obj | The regular expression object to use. | |
str | The string in which to find the given regex. | |
start | Starting index inside string |
void microregex_state_destroy | ( | microregex_state_t * | st | ) |
Destroys state object.
st | Pointer to state object to destroy. |
int microregex_state_get_num_captured | ( | microregex_state_t | st | ) |
Get the number of substrings captured by parenthesis.
st | The state object to use. |
char* microregex_state_get_subexpression | ( | microregex_state_t | st, | |
int | n | |||
) |
Get the substring captured by parenthesis
st | The state object to use. | |
n | The subexpression number (0 = entire match) |