34 #define REGEXTEST_VERSION \ 35 "REGEXTEST V1.0 test regex match function" 38 #include <tfxx/commandline.h> 39 #include <tfxx/regexx.h> 45 int main(
int iargc,
char* argv[])
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;
87 cerr << usage_text << endl;
88 cerr << help_text << endl;
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.
bool optset(const int &iopt) const
true if option # iopt was set on commandline
int main(int iargc, char *argv[])
#define REGEXTEST_VERSION
char * next()
returns char-array of next commandline argument
Namespace containing all components of module commandline. ,.
bool extra() const
true if there are more commandline arguments
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: ...