blob: 3137d4a28cb93cdd164aa9a5ffeeeffd5cd3358c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#pragma once
#include <library/cpp/regex/pcre/regexp.h>
#include <util/generic/map.h>
#include <util/generic/vector.h>
#include <util/generic/maybe.h>
#include <utility>
namespace NYql {
class TPatternGroup {
public:
TPatternGroup() = default;
void Add(const TString& pattern, const TString& alias);
bool IsEmpty() const;
TMaybe<TString> Match(const TString& s) const;
private:
TMap<TString, std::pair<TRegExMatch, TString>> CompiledPatterns;
};
}
|