BESRegex Class Reference

#include <BESRegex.h>

List of all members.

Public Member Functions

 BESRegex (const char *t)
 BESRegex (const char *t, int dummy)
 ~BESRegex ()
int match (const char *s, int len, int pos=0)
 Does the pattern match.
int search (const char *s, int len, int &matchlen, int pos=0)
 How much of the string does the pattern matche.


Detailed Description

a C++ interface to POSIX regular expression functions.

Author:
James Gallagher <jgallagher@opendap.org>


Constructor & Destructor Documentation

BESRegex::BESRegex ( const char *  t  ) 

Initialize a POSIX regular expression (using the 'extended' features).

Parameters:
t The regular expression pattern.

BESRegex::BESRegex ( const char *  t,
int  dummy 
)

Compatability ctor.

See also:
BESRegex::BESRegex(const char* t)

BESRegex::~BESRegex (  ) 


Member Function Documentation

int BESRegex::match ( const char *  s,
int  len,
int  pos = 0 
)

Does the pattern match.

Does the regular expression match the string?

Parameters:
s The string
len The length of string to consider
pos Start looking at this position in the string
Returns:
The number of characters that match, -1 if there's no match.

int BESRegex::search ( const char *  s,
int  len,
int &  matchlen,
int  pos = 0 
)

How much of the string does the pattern matche.

Does the regular expression match the string?

Parameters:
s The string
len The length of string to consider
matchlen Return the length of the matched portion in this value-result parameter.
pos Start looking at this position in the string
Returns:
The start position of the first match. This is different from POSIX regular expressions, whcih return the start position of the longest match.


The documentation for this class was generated from the following files:
Generated on Wed Nov 21 12:20:15 2007 for OPeNDAP Back End Server (BES) by  doxygen 1.4.7