HDK
|
#include <regex.h>
Public Types | |
enum | : unsigned int { CASE_INSENSITIVE = 1u, GLOB = 2u } |
Public Member Functions | |
ArchRegex ()=default | |
Create an empty regex. More... | |
ArchRegex (ArchRegex &&) noexcept=default | |
ArchRegex (ArchRegex const &)=default | |
ArchRegex & | operator= (ArchRegex &&) noexcept=default |
ArchRegex & | operator= (ArchRegex const &)=default |
ARCH_API | ArchRegex (const std::string &pattern, unsigned int flags=0) |
Create with pattern and optional flags. More... | |
ARCH_API | ~ArchRegex () |
Destructor. More... | |
ARCH_API | operator bool () const |
Returns true if the regex is valid. More... | |
ARCH_API std::string | GetError () const |
ARCH_API unsigned int | GetFlags () const |
Returns the flags used to construct the regex. More... | |
ARCH_API bool | Match (const std::string &query) const |
anonymous enum : unsigned int |
|
default |
Create an empty regex.
|
defaultnoexcept |
|
default |
ARCH_API ArchRegex::ArchRegex | ( | const std::string & | pattern, |
unsigned int | flags = 0 |
||
) |
Create with pattern and optional flags.
ARCH_API ArchRegex::~ArchRegex | ( | ) |
Destructor.
ARCH_API std::string ArchRegex::GetError | ( | ) | const |
Returns the reason the regex is invalid or the empty string if it's valid.
ARCH_API bool ArchRegex::Match | ( | const std::string & | query | ) | const |
Returns true
if the regex matches query
anywhere, otherwise returns false
.
|
explicit |
Returns true
if the regex is valid.