diff options
Diffstat (limited to 'src/regmatch.cc')
-rw-r--r-- | src/regmatch.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/regmatch.cc b/src/regmatch.cc index c433087..6e4b261 100644 --- a/src/regmatch.cc +++ b/src/regmatch.cc @@ -5,12 +5,14 @@ * @date 2002-2005 * ----------------------------------------------------------------- **/ #include "regmatch.h" + #include <string> -#include <sys/types.h> -#include <regex.h> #include <stdio.h> +#include <regex.h> +#include <sys/types.h> + using namespace ::std; //------------------------------------------------------------------------ @@ -19,8 +21,7 @@ int Binc::regexMatch(const string &data_in, const string &p_in) regex_t r; regmatch_t rm[2]; - if (regcomp(&r, p_in.c_str(), REG_EXTENDED | REG_NOSUB) != 0) - return 2; + if (regcomp(&r, p_in.c_str(), REG_EXTENDED | REG_NOSUB) != 0) return 2; int n = regexec(&r, data_in.c_str(), data_in.length(), rm, 0); regfree(&r); |