1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2010 InspIRCd Development Team
6 * See: http://wiki.inspircd.org/Credits
8 * This program is free but copyrighted software; see
9 * the file COPYING for details.
11 * ---------------------------------------------------
19 class Regex : public classbase
22 std::string regex_string; // The raw uncompiled regex string.
24 // Constructor may as well be protected, as this class is abstract.
25 Regex(const std::string& rx) : regex_string(rx)
35 virtual bool Matches(const std::string& text) = 0;
37 const std::string& GetRegexString() const
43 class RegexFactory : public DataProvider
46 RegexFactory(Module* Creator, const std::string& Name) : DataProvider(Creator, Name) {}
48 virtual Regex* Create(const std::string& expr) = 0;