OPeNDAP Hyrax Back End Server (BES)  Updated for version 3.8.3
BESRegex Class Reference

a C++ interface to POSIX regular expression functions. More...

#include <BESRegex.h>

Collaboration diagram for BESRegex:
Collaboration graph

Public Member Functions

 BESRegex (const char *t)
 Initialize a POSIX regular expression (using the 'extended' features). More...
 
 BESRegex (const char *t, int dummy)
 Compatability ctor. More...
 
int match (const char *s, int len, int pos=0)
 Does the pattern match. More...
 
int search (const char *s, int len, int &matchlen, int pos=0)
 How much of the string does the pattern matche. More...
 
 ~BESRegex ()
 

Detailed Description

a C++ interface to POSIX regular expression functions.

Author
James Gallagher jgall.nosp@m.aghe.nosp@m.r@ope.nosp@m.ndap.nosp@m..org

Definition at line 41 of file BESRegex.h.

Constructor & Destructor Documentation

BESRegex::BESRegex ( const char *  t)

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

Parameters
tThe regular expression pattern.

Definition at line 84 of file BESRegex.cc.

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

Compatability ctor.

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

Definition at line 91 of file BESRegex.cc.

BESRegex::~BESRegex ( )

Definition at line 74 of file BESRegex.cc.

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
sThe string
lenThe length of string to consider
posStart looking at this position in the string
Returns
The number of characters that match, -1 if there's no match.

Definition at line 103 of file BESRegex.cc.

Referenced by main(), and BESScrub::pathname_ok().

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
sThe string
lenThe length of string to consider
matchlenReturn the length of the matched portion in this value-result parameter.
posStart 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.

Definition at line 132 of file BESRegex.cc.

References BESScrub::size_ok().

Here is the call graph for this function:


The documentation for this class was generated from the following files: