regularexp.h File Reference

Implements a layer for regex. More...

Go to the source code of this file.

Defines

I hate rm_so/eo name!
#define begin   rm_so
#define end   rm_eo

Functions

regmatch_t regfind (const char *from, const char *exp)
 Searches for a regular expression in the given string.
regoff_t regfind_start (const char *from, const char *exp)
 Searches for a regular expression in the given string, returning only the starting offset.
regoff_t regfind_end (const char *from, const char *exp)
 Searches for a regular expression in the given string, returning only the ending offset.
int regfind_count (const char *from, const char *exp, int offset)
 Searches for a regular expression in the given string, returning the number of occurrences.


Detailed Description

Implements a layer for regex.

Author:
Enrico Tassi   <sorry guy>

Alessio Caprari   <sorry guy>

Definition in file regularexp.h.


Define Documentation

#define begin   rm_so

Definition at line 25 of file regularexp.h.

#define end   rm_eo

Definition at line 26 of file regularexp.h.


Function Documentation

regmatch_t regfind ( const char *  from,
const char *  exp 
)

Searches for a regular expression in the given string.

Parameters:
from the source string
exp the regular expression
Returns:
a struct with a begin and end fields

int regfind_count ( const char *  from,
const char *  exp,
int  offset 
)

Searches for a regular expression in the given string, returning the number of occurrences.

Parameters:
offset if we want to count "baab" and the last b must be used to form another match we can say to go back offset characters after each match. so passing offset = 1 "baabaab" counts 2 instead of 1.
Returns:
the number of occurrences of exp in from
See also:
regfind()

regoff_t regfind_end ( const char *  from,
const char *  exp 
)

Searches for a regular expression in the given string, returning only the ending offset.

Returns:
The end offset of the match
See also:
regfind()

regoff_t regfind_start ( const char *  from,
const char *  exp 
)

Searches for a regular expression in the given string, returning only the starting offset.

Returns:
The start offset of the match
See also:
regfind()


Generated on Sat Nov 1 15:55:53 2008 for FreePOPs by  doxygen 1.5.6