CoxIter  1.3
CoxIter - Computing invariants of hyperbolic Coxeter groups
Public Member Functions | Private Attributes | List of all members
PCRERegexp Class Reference

#include <regexp.h>

Public Member Functions

 PCRERegexp (int iOvectorSize=30)
 
 ~PCRERegexp ()
 
int preg_match_all (const string &pattern, const string &subject, PCREResult &results, const int &optionsCompile=0)
 As the usual PHP preg_match_all: executes the regexp and fetch all the occurrences. More...
 
string get_error ()
 Return the error ccode. More...
 

Private Attributes

string error
 Eventually, error code. More...
 
bool isClassUsed
 True if the class was used. More...
 
pcre * regexp
 
const char * regPattern
 
const char * regSubject
 
const char * regError
 
int regErrorOffset
 
int regSubjectLength
 
int * ovector
 Information about the result. More...
 
int iOvectorSize
 Size of the ovector array. More...
 

Constructor & Destructor Documentation

◆ PCRERegexp()

PCRERegexp::PCRERegexp ( int  iOvectorSize = 30)

◆ ~PCRERegexp()

PCRERegexp::~PCRERegexp ( )

Member Function Documentation

◆ get_error()

PCRERegexp::get_error ( )

Return the error ccode.

Returns
Error code (string)

◆ preg_match_all()

PCRERegexp::preg_match_all ( const string &  pattern,
const string &  subject,
PCREResult results,
const int &  optionsCompile = 0 
)

As the usual PHP preg_match_all: executes the regexp and fetch all the occurrences.

Parameters
pattern(conststring &) The pattern to search for
subject(conststring &) The input string
results(PCREResult&) Array of all matches in multi-dimensional array
optionsCompile(constint&) Options for the regexp. For example: 0, PCRE_CASELESS
Returns
Number of results (unsigned int) or -1 if an error occurred

Member Data Documentation

◆ error

string PCRERegexp::error
private

Eventually, error code.

◆ iOvectorSize

int PCRERegexp::iOvectorSize
private

Size of the ovector array.

◆ isClassUsed

bool PCRERegexp::isClassUsed
private

True if the class was used.

◆ ovector

int* PCRERegexp::ovector
private

Information about the result.

◆ regError

const char* PCRERegexp::regError
private

◆ regErrorOffset

int PCRERegexp::regErrorOffset
private

◆ regexp

pcre* PCRERegexp::regexp
private

◆ regPattern

const char* PCRERegexp::regPattern
private

◆ regSubject

const char* PCRERegexp::regSubject
private

◆ regSubjectLength

int PCRERegexp::regSubjectLength
private

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