32#define PCRE2_CODE_UNIT_WIDTH 8 
   34#define PCRE_CASELESS  PCRE2_CASELESS 
   35#define PCRE_MULTILINE PCRE2_MULTILINE 
   36#define PCRE_DOTALL    PCRE2_DOTALL 
   37#define PCRE_EXTENDED  PCRE2_EXTENDED 
   38#define PCRE_ERROR_NOMATCH PCRE2_ERROR_NOMATCH 
  196            Error(
"ParseMods", 
"illegal pattern modifier: %c", *
m);
 
 
  258         throw std::runtime_error
 
  259            (
TString::Format(
"TPRegexp::Compile() compilation of TPRegexp(%s) failed at: %d because %s",
 
  262         Error(
"Compile", 
"compilation of TPRegexp(%s) failed at: %d because %s",
 
 
  291      Error(
"Optimize", 
"Optimization of TPRegexp(%s) failed: %s",
 
 
  309   while (state != -1) {
 
  324                  Error(
"ReplaceSubs", 
"badly formed replacement pattern: %s",
 
  336                  Info(
"ReplaceSubs", 
"PREGEX appending substr #%d", 
subnum);
 
  338                  Error(
"ReplaceSubs",
"bad string number: %d",
subnum);
 
 
  388      for (
int i = 0; i < 2 * 
nrMatch; ++i)
 
 
  506      for (
int i = 0; i < 2 * 
nrMatch; ++i)
 
 
  656   return (*
this)(
r, 0);
 
 
  681   fAddressOfLastString(nullptr),
 
  682   fLastGlobalPosition(0)
 
 
  698   fAddressOfLastString(nullptr),
 
  699   fLastGlobalPosition(0)
 
 
  716   fAddressOfLastString(nullptr),
 
  717   fLastGlobalPosition(0)
 
 
  730   fNMaxMatches(
r.fNMaxMatches),
 
  732   fAddressOfLastString(nullptr),
 
  733   fLastGlobalPosition(0)
 
 
  976            case  0 : 
ret += 
'\\'; 
break;
 
  977            case 'l': state = 1;   
break;
 
  978            case 'u': state = 2;   
break;
 
  979            case 'L': state = 3;   
break;
 
  980            case 'U': state = 4;   
break;
 
  981            case 'E': state = 0;   
break;
 
  987            case 0:  
ret += 
c; 
break;
 
  992            default: 
Error(
"TPMERegexp::Substitute", 
"invalid state.");
 
 
 1032         Printf(
"  %d - %s", i, 
operator[](i).Data());
 
 
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
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 Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
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
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
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 Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
const_iterator begin() const
const_iterator end() const
Array of integers (32 bits per element).
void Set(Int_t n) override
Set size of this array to n ints.
Collectable string class.
Wrapper for PCRE library (Perl Compatible Regular Expressions).
Int_t fLastGlobalPosition
void ResetGlobalState()
Reset state of global match.
void * fAddressOfLastString
virtual void Print(Option_t *option="")
Print the regular expression and modifier options.
Int_t Split(const TString &s, Int_t maxfields=0)
Splits into at most maxfields.
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.
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.
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.
TStringToken(const TString &fullStr, const TString &splitRe, Bool_t retVoid=kFALSE)
Constructor.
Bool_t NextToken()
Get the next token, it is stored in this TString.
char & operator()(Ssiz_t i)
void ToLower()
Change string to lower-case.
const char * Data() const
TString & operator=(char s)
Assign character c to TString.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
A zero length substring is legal.