diff options
author | akhropov <akhropov@yandex-team.ru> | 2022-02-10 16:46:32 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:32 +0300 |
commit | 00afc96e9c0298054b7386fa7fb9e3cc3d67b974 (patch) | |
tree | cb7a9f4a92c0d4cc5a86eeed49ad71e810953c1f /library/cpp/regex/pcre/regexp.h | |
parent | 83a8efcf3af051e3dd59c00d1d5dafc96412ec1e (diff) | |
download | ydb-00afc96e9c0298054b7386fa7fb9e3cc3d67b974.tar.gz |
Restoring authorship annotation for <akhropov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/regex/pcre/regexp.h')
-rw-r--r-- | library/cpp/regex/pcre/regexp.h | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/library/cpp/regex/pcre/regexp.h b/library/cpp/regex/pcre/regexp.h index bc610bd2f3..9862a9b85b 100644 --- a/library/cpp/regex/pcre/regexp.h +++ b/library/cpp/regex/pcre/regexp.h @@ -17,15 +17,15 @@ class TRegExBaseImpl; class TRegExBase { -protected: +protected: TSimpleIntrusivePtr<TRegExBaseImpl> Impl; -public: +public: TRegExBase(const char* regExpr = nullptr, int cflags = REG_EXTENDED); TRegExBase(const TString& regExpr, int cflags = REG_EXTENDED); virtual ~TRegExBase(); - + int Exec(const char* str, regmatch_t pmatch[], int eflags, int nmatches = NMATCHES) const; void Compile(const TString& regExpr, int cflags = REG_EXTENDED); bool IsCompiled() const; @@ -34,30 +34,30 @@ public: }; class TRegExMatch: public TRegExBase { -public: +public: TRegExMatch(const char* regExpr = nullptr, int cflags = REG_NOSUB | REG_EXTENDED); TRegExMatch(const TString& regExpr, int cflags = REG_NOSUB | REG_EXTENDED); bool Match(const char* str) const; -}; +}; struct TBackReferences { - int Beg; - int End; - int Refer; -}; + int Beg; + int End; + int Refer; +}; class TRegExSubst: public TRegExBase { -private: - const char* Replacement; +private: + const char* Replacement; regmatch_t PMatch[NMATCHES]; - - TBackReferences Brfs[NMATCHES]; - int BrfsCount; - -public: + + TBackReferences Brfs[NMATCHES]; + int BrfsCount; + +public: TRegExSubst(const char* regExpr = nullptr, int cflags = REG_EXTENDED); - + TString Replace(const char* str, int eflags = 0); int ParseReplacement(const char* replacement); }; |