64 Bool_t doDollarSubst)
const;
80 return (
Match(s,mods,start,nMaxMatch) > 0); }
#define ClassDef(name, id)
#define ClassDefOverride(name, id)
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Array of integers (32 bits per element).
Wrapper for PCRE library (Perl Compatible Regular Expressions).
Int_t GetGlobalPosition() const
Int_t fLastGlobalPosition
void ResetGlobalState()
Reset state of global match.
void * fAddressOfLastString
Int_t GetNMaxMatches() const
virtual void Print(Option_t *option="")
Print the regular expression and modifier options.
TPMERegexp()
Default constructor. This regexp will match an empty string.
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...
TString operator[](Int_t)
Returns the sub-string from the internal fMarkers vector.
Int_t Match(const TString &s, UInt_t start=0)
Runs a match on s against the regex 'this' was created with.
TPMERegexp & operator=(const TPMERegexp &)=delete
void SetNMaxMatches(Int_t nm)
void Reset(const TString &s, const TString &opts="", Int_t nMatchMax=-1)
Reset the pattern and options.
TString fLastStringMatched
void AssignGlobalState(const TPMERegexp &re)
Copy global-match state from 're; so that this regexp can continue parsing the string from where 're'...
void Compile()
Compile the fPattern.
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.
Bool_t IsValid() const
Returns true if underlying PCRE structure has been successfully generated via regexp compilation.
TPRegexp & operator=(const TPRegexp &p)
Assignment operator.
UInt_t ParseMods(const TString &mods) const
Translate Perl modifier flags into pcre flags.
Int_t Match(const TString &s, const TString &mods="", Int_t start=0, Int_t nMaxMatch=10, TArrayI *pos=nullptr)
The number of matches is returned, this equals the full match + sub-pattern matches.
Bool_t MatchB(const TString &s, const TString &mods="", Int_t start=0, Int_t nMaxMatch=10)
TString GetPattern() const
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 Bool_t fgThrowAtCompileError
Int_t ReplaceSubs(const TString &s, TString &final, const TString &replacePattern, Int_t *ovec, Int_t nmatch) const
Returns the number of expanded '$' constructs.
virtual ~TPRegexp()
Cleanup.
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...
Int_t MatchInternal(const TString &s, Int_t start, Int_t nMaxMatch, TArrayI *pos=nullptr) const
Perform the actual matching - protected method.
TString GetModifiers() const
Return PCRE modifier options as string.
static Bool_t GetThrowAtCompileError()
Get value of static flag controlling whether exception should be thrown upon an error during regular ...
void Optimize()
Send the pattern through the optimizer.
static void SetThrowAtCompileError(Bool_t throwp)
Set static flag controlling whether exception should be thrown upon an error during regular expressio...
Provides iteration through tokens of a given string.
Bool_t NextToken()
Get the next token, it is stored in this TString.
#define Split(a, ahi, aLo)