25 #include "colselect.h" 48 )
throw ( Exception ) {
51 pcre_extra* pe = NULL;
59 if ( NULL == (re = pcre_compile( pattern.c_str( ),
64 throw( Exception( error ) );
66 if ( 0 > (rc = pcre_exec( re,
76 case PCRE_ERROR_NOMATCH:
80 throw( Exception(
"NULL pattern or subject string." ) );
82 case PCRE_ERROR_BADOPTION:
83 throw( Exception(
"Bad option." ) );
85 case PCRE_ERROR_BADMAGIC:
86 throw( Exception(
"Bad magic number(possible junk regex pointer?)" ) );
88 case PCRE_ERROR_UNKNOWN_NODE:
89 throw( Exception(
"Was your compiled pattern overwritten?" ) );
91 case PCRE_ERROR_NOMEMORY:
92 throw( Exception(
"Out of memory." ) );
95 throw( Exception(
"Unforeseen matching error." ) ) ;
bool match(const string &str, const string &pattern)
handles Perl regular expression matching.
The suplib namespace encompasses all of the functions in the suplib++ library.