52 "usage: regextest" "\n" 53 " or: regextest --help|-h" "\n" 59 "first string on command line: regular expression" "\n" 60 "subsequent strings will be checked against expression" "\n" 77 cerr << usage_text << endl;
85 if (cmdline.optset(0))
87 cerr << usage_text << endl;
88 cerr << help_text << endl;
116 TFXX_assert(cmdline.extra(),
"missing regular expression");
118 cout <<
"regular expression: " << myregex.
expression() << endl;
120 while (cmdline.extra())
122 std::string teststring(cmdline.next());
123 if (myregex.match(teststring))
129 cout <<
"does NOT match: ";
131 cout << teststring << endl;
#define TFXX_assert(C, M)
Check an assertion and report by throwing an exception.
void expression(const std::string &e)
set expression to e.
#define REGEXTEST_VERSION
Namespace containing all components of module commandline. ,.
Evaluates commandline by calling long_getopt. ,You may instantiate a Commandline object by passing th...
struct to define options ,This struct is used to define a list of options. An example is: ...