|
Squid Web Cache v8/master
|
#include <RegexPattern.h>
Public Member Functions | |
| RegexPattern ()=delete | |
| RegexPattern (const SBuf &aPattern, int aFlags) | |
| ~RegexPattern () | |
| RegexPattern (RegexPattern &&)=delete | |
| bool | caseSensitive () const |
| whether the regex differentiates letter case | |
| bool | isDot () const |
| whether this is an "any single character" regex (".") | |
| bool | match (const char *str) const |
| void | print (std::ostream &os, const RegexPattern *previous=nullptr) const |
Private Member Functions | |
| MEMPROXY_CLASS (RegexPattern) | |
Private Attributes | |
| SBuf | pattern |
| a regular expression in the text form, suitable for regcomp(3) | |
| const int | flags |
| bitmask of REG_* flags for regcomp(3) | |
| regex_t | regex |
| a "compiled pattern buffer" filled by regcomp(3) for regexec(3) | |
A regular expression, plain text and compiled representations
Definition at line 23 of file RegexPattern.h.
|
delete |
Definition at line 18 of file RegexPattern.cc.
References SBuf::c_str(), debugs, Debug::Extra(), flags, Here, pattern, regex, and ToSBuf().
| RegexPattern::~RegexPattern | ( | ) |
Definition at line 36 of file RegexPattern.cc.
References regex.
|
delete |
|
inline |
|
inline |
Definition at line 38 of file RegexPattern.h.
References SBuf::length(), and pattern.
|
inline |
|
private |
| void RegexPattern::print | ( | std::ostream & | os, |
| const RegexPattern * | previous = nullptr |
||
| ) | const |
Attempts to reproduce this regex (context-sensitive) configuration. If the previous regex is nil, may not report default flags. Otherwise, may not report same-as-previous flags (and prepends a space).
Definition at line 42 of file RegexPattern.cc.
References caseSensitive(), flags, and pattern.
Referenced by ACLRegexData::dump(), and operator<<().
|
private |
Definition at line 52 of file RegexPattern.h.
Referenced by RegexPattern(), caseSensitive(), and print().
|
private |
Definition at line 49 of file RegexPattern.h.
Referenced by RegexPattern(), isDot(), and print().
|
private |
Definition at line 55 of file RegexPattern.h.
Referenced by RegexPattern(), ~RegexPattern(), and match().