libdap  Updated for version 3.17.0
libdap::Regex Class Reference

#include <GNURegex.h>

List of all members.

Public Member Functions

int match (const char *s, int len, int pos=0)
 Does the pattern match.
 Regex (const char *t)
 Regex (const char *t, int dummy)
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>

Definition at line 35 of file GNURegex.h.


Constructor & Destructor Documentation

libdap::Regex::Regex ( const char *  t)

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

Parameters:
tThe regular expression pattern.

Definition at line 96 of file GNURegex.cc.

libdap::Regex::Regex ( const char *  t,
int  dummy 
)

Compatability ctor.

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

Definition at line 103 of file GNURegex.cc.


Member Function Documentation

int libdap::Regex::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 115 of file GNURegex.cc.

int libdap::Regex::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 147 of file GNURegex.cc.


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