2#ifndef __ASE_REGEX_HH__
3#define __ASE_REGEX_HH__
30extern constexpr inline Re::Flags operator| (Re::Flags a, Re::Flags b) {
return Re::Flags (int32_t (a) | int32_t (b)); }
Wrapper for std::regex to simplify usage and reduce compilation time.
static String sub(const String ®ex, const String &subst, const String &input, Flags=DEFAULT)
Substitute regex in input by sbref with backreferences $00…$99 or $&.
static String grep(const String ®ex, const String &input, int group=0, Flags=DEFAULT)
Find regex in input and return matching string.
static StringS findall(const String ®ex, const String &input, Flags=DEFAULT)
Find regex in input and return non-overlapping matches.
static ssize_t search(const String ®ex, const String &input, Flags=DEFAULT)
Find regex in input and return match position >= 0 or return < 0 otherwise.
The Anklang C++ API namespace.
uint32_t uint
Provide 'uint' as convenience type.