EPICS ARCHIVER V4
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups
Public Member Functions | Static Public Member Functions | Friends | List of all members
RegularExpression Class Reference

Wrapper for Unix/GNU regex library. More...

#include <RegularExpression.h>

Public Member Functions

 RegularExpression (const char *pattern, bool case_sensitive=true)
 Create RegularExpression with pattern for further matches. More...
 
 RegularExpression (const RegularExpression &rhs)
 Copy constructor.
 
 ~RegularExpression ()
 Destructor.
 
bool doesMatch (const char *input)
 Test if 'input' matches current pattern. More...
 
bool doesMatch (const stdString &input)
 Check.
 

Static Public Member Functions

static std::string fromGlobPattern (const std::string &glob)
 Create a regular expression for a "glob" pattern: question mark - any character star - many characters case insensitive.
 

Friends

class ToRemoveGNUCompilerWarning
 

Detailed Description

Wrapper for Unix/GNU regex library.

Constructor & Destructor Documentation

RegularExpression::RegularExpression ( const char *  pattern,
bool  case_sensitive = true 
)
inline

Create RegularExpression with pattern for further matches.

Exceptions
GenericExceptionon compilation error

Member Function Documentation

bool RegularExpression::doesMatch ( const char *  input)

Test if 'input' matches current pattern.

Currently uses

  • EXTENDED regular expression
  • case sensitive
  • input must be anchored for full-string match, otherwise substrings will match: abc matches b abc does not match $b^

When no pattern was supplied, anything matches!


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