32 # include <vcl_msvc_warnings.h> 111 bool find(
char const*);
113 bool find(std::string
const&);
125 inline bool is_valid()
const {
return this->program !=
nullptr; }
137 return this->endp[n] == this->startp[n] ? std::string(
"") :
138 std::string(this->startp[n], this->endp[n] - this->startp[n]);
143 static const char *
protect(
char c);
150 #endif // vul_reg_exph const char * startp[vul_reg_exp_nsubexp]
anchor point of start position for n-th matching regular expression.
Pattern matching with regular expressions.
char regstart
Internal use only.
bool find(char const *)
true if regexp in char* arg.
bool operator!=(vul_reg_exp const &r) const
Inequality operator.
static const char * protect(char c)
Return an expression that will match precisely c.
const char * regmust
Internal use only.
std::ptrdiff_t end() const
Returns the end index of the last item found.
std::ptrdiff_t end(long n) const
Return end index of nth submatch.
bool operator==(vul_reg_exp const &) const
Equality operator.
const char * endp[vul_reg_exp_nsubexp]
anchor point of end position for n-th matching regular expression.
bool is_valid() const
Returns true if a valid RE is compiled and ready for pattern matching.
~vul_reg_exp()
Frees space allocated for regular expression.
void clear_bufs()
private function to clear startp[] and endp[].
const char * searchstring
vul_reg_exp(char const *s)
Creates a regular expression from string s, and compiles s.
constexpr int vul_reg_exp_nsubexp
std::ptrdiff_t start() const
Returns the start index of the last item found.
bool deep_equal(vul_reg_exp const &) const
Same regexp and state?.
int regmlen
Internal use only.
std::ptrdiff_t start(long n) const
Return start index of nth submatch.
void set_invalid()
Invalidates regular expression.
vul_reg_exp()
Creates an empty regular expression.
char reganch
Internal use only.
std::string match(int n) const
Return nth submatch as a string.
void compile(char const *)
Compiles char* --> regexp.