bes  Updated for version 3.17.4
BESRegex Class Reference

#include <BESRegex.h>

Public Member Functions

 BESRegex (const char *t)
 
 BESRegex (const char *t, int dummy)
 
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...
 

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() [1/2]

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() [2/2]

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

Compatability ctor.

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

Definition at line 91 of file BESRegex.cc.

Member Function Documentation

◆ match()

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

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.

◆ search()

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

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().


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