70 Bool_t doDollarSubst)
const;
Bool_t IsValid() const
Returns true if underlying PCRE structure has been successfully generated via regexp compilation...
TString fLastStringMatched
Int_t GetGlobalPosition() const
Bool_t MatchB(const TString &s, const TString &mods="", Int_t start=0, Int_t nMaxMatch=10)
TPMERegexp & operator=(const TPMERegexp &)
Int_t GetNMaxMatches() const
void AssignGlobalState(const TPMERegexp &re)
Copy global-match state from 're; so that this regexp can continue parsing the string from where 're'...
TObjArray * MatchS(const TString &s, const TString &mods="", Int_t start=0, Int_t nMaxMatch=10)
Returns a TObjArray of matched substrings as TObjString's.
static void SetThrowAtCompileError(Bool_t throwp)
Set static flag controlling whether exception should be thrown upon an error during regular expressio...
virtual ~TPRegexp()
Cleanup.
TString GetModifiers() const
Return PCRE modifier options as string.
Int_t Substitute(TString &s, const TString &replace, const TString &mods="", Int_t start=0, Int_t nMatchMax=10)
Substitute replaces the string s by a new string in which matching patterns are replaced by the repla...
Array of integers (32 bits per element).
TStringToken(const TString &fullStr, const TString &splitRe, Bool_t retVoid=kFALSE)
#define ClassDef(name, id)
Provides iteration through tokens of a given string.
TString GetPattern() const
void Compile()
Compile the fPattern.
void SetNMaxMatches(Int_t nm)
Int_t Split(const TString &s, Int_t maxfields=0)
Splits into at most maxfields.
void * fAddressOfLastString
TPRegexp & operator=(const TPRegexp &p)
Assignment operator.
virtual void Print(Option_t *option="")
Print the regular expression and modifier options.
UInt_t ParseMods(const TString &mods) const
Translate Perl modifier flags into pcre flags.
TPMERegexp()
Default constructor. This regexp will match an empty string.
Int_t SubstituteInternal(TString &s, const TString &replace, Int_t start, Int_t nMaxMatch0, Bool_t doDollarSubst) const
Perform pattern substitution with optional back-ref replacement.
Int_t MatchInternal(const TString &s, Int_t start, Int_t nMaxMatch, TArrayI *pos=0) const
Perform the actual matching - protected method.
Bool_t NextToken()
Get the next token, it is stored in this TString.
static Bool_t fgThrowAtCompileError
static Bool_t GetThrowAtCompileError()
Get value of static flag controlling whether exception should be thrown upon an error during regular ...
Int_t Match(const TString &s, UInt_t start=0)
Runs a match on s against the regex 'this' was created with.
Wrapper for PCRE library (Perl Compatible Regular Expressions).
Int_t fLastGlobalPosition
Int_t ReplaceSubs(const TString &s, TString &final, const TString &replacePattern, Int_t *ovec, Int_t nmatch) const
Returns the number of expanded '$' constructs.
void Reset(const TString &s, const TString &opts="", Int_t nMatchMax=-1)
Reset the pattern and options.
Int_t Substitute(TString &s, const TString &r, Bool_t doDollarSubst=kTRUE)
Substitute matching part of s with r, dollar back-ref substitution is performed if doDollarSubst is t...
Int_t Match(const TString &s, const TString &mods="", Int_t start=0, Int_t nMaxMatch=10, TArrayI *pos=0)
The number of matches is returned, this equals the full match + sub-pattern matches.
TString operator[](Int_t)
Returns the sub-string from the internal fMarkers vector.
void Optimize()
Send the pattern through the optimizer.
void ResetGlobalState()
Reset state of global match.