regex.c File Reference

#include
#include
#include
#include "nntpgrab_utils.h"

Functions

NGRegex nntpgrab_utils_regex_compile (const char *regex)
  Compile a regular expression.
void  nntpgrab_utils_regex_free (NGRegex *re)
  Free a compiled regular expression.
const char **  nntpgrab_utils_regex_match (NGRegex *re, const char *line)
  Perform a match against a compiled regular expression.
void  nntpgrab_utils_regex_matches_free (const char **matches)
  Free an array of matched items.

Function Documentation

NGRegex* nntpgrab_utils_regex_compile ( const char *  regex  ) 

Compile a regular expression.

Parameters:
regex  The (perl-compatible) regular expression which needs to be compiled
Returns:
A compiled regular expression

void nntpgrab_utils_regex_free ( NGRegex re  ) 

Free a compiled regular expression.

Parameters:
re  The compiled regular expression

const char** nntpgrab_utils_regex_match ( NGRegex re,
const char *  line  
)

Perform a match against a compiled regular expression.

Parameters:
re  The compiled regular expression
line  The data which need to be matched against the compiled regular expression
Returns:
A NULL-terminated array of matches items (needs to be free'd using nntpgrab_utils_regex_matches_free())

void nntpgrab_utils_regex_matches_free ( const char **  matches  ) 

Free an array of matched items.

Parameters:
matches  The NULL-terminated array of matches as returned by the function nntpgrab_utils_regex_match()


Generated on Thu May 21 21:25:05 2009 for NNTPGrab by  1.5.4