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 | 298c6da79f1d8f35089a67f463f0b541bec36d9b (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /library/cpp/regex/pcre/regexp.h | |
parent | 00afc96e9c0298054b7386fa7fb9e3cc3d67b974 (diff) | |
download | ydb-298c6da79f1d8f35089a67f463f0b541bec36d9b.tar.gz |
Restoring authorship annotation for <akhropov@yandex-team.ru>. Commit 2 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 9862a9b85b..bc610bd2f3 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); }; |