1 // ANNA - Anna is Not Nothingness Anymore //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
15 #include <anna/core/functions.hpp>
16 #include <anna/core/core.hpp>
17 #include <anna/core/RuntimeException.hpp>
18 #include <anna/core/util/RegularExpression.hpp>
24 void _exit(const std::string & msg) {
25 std::cout << std::endl << msg << std::endl;
30 int main(int argc, char** argv) {
31 Logger::setLevel(Logger::Information);
32 // Logger::setLevel(Logger::Debug);
33 Logger::initialize("RegularExpression", new TraceWriter("file.trace", 2048000));
35 anna::RegularExpression myExp;
36 anna::RegularExpression myExpB("65");
37 myExp.setPattern("656");
38 std::string value1, value2;
39 std::cout << "Input value1:" ;
41 std::cout << "Input value2:" ;
44 if (myExp.isLike(value1)) std::cout << "The input value1 match the regular expresion" << std::endl;
46 if (myExp.isLike(value2)) std::cout << "The input value2 match the regular expresion" << std::endl;
48 if (myExpB < myExp) std::cout << "myExpB < myExp" << std::endl;