bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
|
Regular expression matching. More...
#include <BESRegex.h>
Public Member Functions | |
BESRegex (const char *s) | |
initialize a BESRegex with a C string | |
BESRegex (const char *s, int) | |
BESRegex (const std::string &s) | |
initialize a BESRegex with a C++ string | |
int | match (const char *s, int len, int pos=0) const |
Does the pattern match. | |
int | match (const std::string &s) const |
Does the pattern match. | |
std::string | pattern () const |
int | search (const char *s, int len, int &matchlen, int pos=0) const |
Where does the pattern match. | |
int | search (const std::string &s, int &matchlen) const |
Where does the pattern match. | |
Regular expression matching.
This class provides an interface that mimics the libgnu C++ library that was used with the first version of libdap (c. 1993). It has been re-implemented several times, this last time using the C++-11 regex class. We found this was faster than the unix regex_t (man(3)) that was being used.
Definition at line 88 of file BESRegex.h.
|
inlineexplicit |
initialize a BESRegex with a C string
Definition at line 113 of file BESRegex.h.
|
inlineexplicit |
initialize a BESRegex with a C++ string
Definition at line 115 of file BESRegex.h.
|
inline |
Definition at line 117 of file BESRegex.h.
BESRegex::~BESRegex | ( | ) |
Definition at line 57 of file BESRegex.cc.
Does the pattern match.
Look for a match to the regular expression in the string
s | The string |
len | The length of string to consider |
pos | Start looking at this position in the string |
Definition at line 70 of file BESRegex.cc.
int BESRegex::match | ( | const std::string & | s | ) | const |
Does the pattern match.
Look for a match to the regular expression in the string.
s | The target for the search |
Definition at line 105 of file BESRegex.cc.
|
inline |
Definition at line 125 of file BESRegex.h.
Where does the pattern match.
Search for a match to the regex in the string.
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 |
Definition at line 127 of file BESRegex.cc.
Where does the pattern match.
Search for a match to the regex in the string.
s | The target for the search |
matchlen | The number of characters that matched |
Definition at line 179 of file BESRegex.cc.