TRegexp


class description - source file - inheritance tree

class TRegexp

    private:
void CopyPattern(const TRegexp& re) void GenPattern(const char* re) const char* MakeWildcard(const char* re) const public:
TRegexp TRegexp(const char* re, Bool_t wildcard = kFALSE) TRegexp TRegexp(const TString& re) TRegexp TRegexp(const TRegexp& re) virtual void ~TRegexp() static TClass* Class() Ssiz_t Index(const TString& str, Ssiz_t* len, Ssiz_t start = 0) const virtual TClass* IsA() const TRegexp& operator=(const TRegexp& re) TRegexp& operator=(const TString& re) TRegexp& operator=(const char* re) virtual void ShowMembers(TMemberInspector& insp, char* parent) TRegexp::EStatVal Status() virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members

    private:
unsigned short* fPattern Compiled pattern TRegexp::EStatVal fStat Status static const unsigned int fgMaxpat Max length of compiled pattern public:
static const TRegexp::EStatVal kOK static const TRegexp::EStatVal kIllegal static const TRegexp::EStatVal kNomem static const TRegexp::EStatVal kToolong

Class Description

                                                                      
 TRegexp                                                              
                                                                      
 Regular expression class.                                            
                                                                      


TRegexp(const char *re, Bool_t wildcard)
 Create a regular expression from the input string. If wildcard is true
 then the input string contains a wildcard expression (see MakeWildcard()).

TRegexp(const TString& re)
 Create a regular expression from a TString.

TRegexp(const TRegexp& r)
 Copy ctor.

~TRegexp()

void GenPattern(const char *str)
 Generate the regular expression pattern.

void CopyPattern(const TRegexp& r)
 Copy the regular expression pattern.

const char* MakeWildcard(const char *re)
 This routine transforms a wildcarding regular expression into
 a general regular expression used for pattern matching.
 When using wildcards the regular expression is assumed to be
 preceded by a "^" (BOL) and terminated by a "$" (EOL). Also, all
 "*"'s (closures) are assumed to be preceded by a "." (i.e. any character,
 except "/"'s) and all .'s are escaped (so *.ps is different from *.eps).
 The special treatment of "/" allows the easy matching of pathnames, e.g.
 "*.root" will match "aap.root", but not "pipo/aap.root".

Ssiz_t Index(const TString& string, Ssiz_t* len, Ssiz_t i) const
 Find the first occurance of the regexp in string and return the position.
 Len is length of the matched string and i is the offset at which the
 matching should start.



Inline Functions


                 TRegexp& operator=(const TRegexp& re)
                 TRegexp& operator=(const TString& re)
                 TRegexp& operator=(const char* re)
        TRegexp::EStatVal Status()
                  TClass* Class()
                  TClass* IsA() const
                     void ShowMembers(TMemberInspector& insp, char* parent)
                     void Streamer(TBuffer& b)
                     void StreamerNVirtual(TBuffer& b)


Author: Fons Rademakers 04/08/95
Last update: root/base:$Name: $:$Id: TRegexp.cxx,v 1.10 2002/10/02 12:33:28 rdm Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.