aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/regex/pcre/regexp.h
diff options
context:
space:
mode:
authorAnton Samokhvalov <pg83@yandex.ru>2022-02-10 16:45:17 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:17 +0300
commitd3a398281c6fd1d3672036cb2d63f842d2cb28c5 (patch)
treedd4bd3ca0f36b817e96812825ffaf10d645803f2 /library/cpp/regex/pcre/regexp.h
parent72cb13b4aff9bc9cf22e49251bc8fd143f82538f (diff)
downloadydb-d3a398281c6fd1d3672036cb2d63f842d2cb28c5.tar.gz
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/regex/pcre/regexp.h')
-rw-r--r--library/cpp/regex/pcre/regexp.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/library/cpp/regex/pcre/regexp.h b/library/cpp/regex/pcre/regexp.h
index c74d20b3ad..bc610bd2f3 100644
--- a/library/cpp/regex/pcre/regexp.h
+++ b/library/cpp/regex/pcre/regexp.h
@@ -1,16 +1,16 @@
#pragma once
#include <sys/types.h>
-
+
#include <util/system/defaults.h>
#include <util/generic/string.h>
#include <util/generic/yexception.h>
-
-#include <contrib/libs/pcre/pcre.h>
-#include <contrib/libs/pcre/pcreposix.h>
-
+
+#include <contrib/libs/pcre/pcre.h>
+#include <contrib/libs/pcre/pcreposix.h>
+
//THIS CODE LOOKS LIKE A TRASH, BUT WORKS.
-
+
#define NMATCHES 100
#define REGEXP_GLOBAL 0x0080 // use this if you want to find all occurences
@@ -19,38 +19,38 @@ class TRegExBaseImpl;
class TRegExBase {
protected:
TSimpleIntrusivePtr<TRegExBaseImpl> Impl;
-
+
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;
+ 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;
int GetCompileOptions() const;
TString GetRegExpr() const;
};
-class TRegExMatch: public TRegExBase {
+class TRegExMatch: public TRegExBase {
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;
+ bool Match(const char* str) const;
};
-struct TBackReferences {
+struct TBackReferences {
int Beg;
int End;
int Refer;
};
-class TRegExSubst: public TRegExBase {
+class TRegExSubst: public TRegExBase {
private:
const char* Replacement;
- regmatch_t PMatch[NMATCHES];
+ regmatch_t PMatch[NMATCHES];
TBackReferences Brfs[NMATCHES];
int BrfsCount;
@@ -59,5 +59,5 @@ public:
TRegExSubst(const char* regExpr = nullptr, int cflags = REG_EXTENDED);
TString Replace(const char* str, int eflags = 0);
- int ParseReplacement(const char* replacement);
+ int ParseReplacement(const char* replacement);
};