diff --git a/yateclass.h b/yateclass.h index 31a5aa65..75fbe5a2 100644 --- a/yateclass.h +++ b/yateclass.h @@ -2915,6 +2915,13 @@ public: inline Regexp& operator=(const char* value) { String::operator=(value); return *this; } + /** + * Check if the regular expression is valid + * @return True if valid, false if not + */ + inline bool valid() const + { return m_regexp != 0; } + /** * Makes sure the regular expression is compiled * @return True if successfully compiled, false on error