strusBase  0.17
Classes | Public Member Functions | List of all members
strus::RegexSearch Class Reference

Class to search for a regular expression. More...

#include <regex.hpp>

Classes

struct  Match
 

Public Member Functions

 RegexSearch (const std::string &expression, int index, ErrorBufferInterface *errhnd_)
 Constructor. More...
 
 ~RegexSearch ()
 Destructor. More...
 
Match find (const char *begin, const char *end) const
 Execute the search. More...
 
int match_start (const char *begin, const char *end) const
 Match the regex to the start of the source. More...
 

Detailed Description

Class to search for a regular expression.

Constructor & Destructor Documentation

strus::RegexSearch::RegexSearch ( const std::string &  expression,
int  index,
ErrorBufferInterface errhnd_ 
)

Constructor.

Parameters
[in]expressionregular expression string (POSIX)
strus::RegexSearch::~RegexSearch ( )

Destructor.

Member Function Documentation

Match strus::RegexSearch::find ( const char *  begin,
const char *  end 
) const

Execute the search.

Parameters
[in]beginpointer to the start of the string to search
[in]endpointer to the end of the string to search
Returns
a description of the match
int strus::RegexSearch::match_start ( const char *  begin,
const char *  end 
) const

Match the regex to the start of the source.

Parameters
[in]beginpointer to the start of the string to search
[in]endpointer to the end of the string to search
Returns
length of the match in byte or -1 if it did not match

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