From 51bae1e1c852a121a154da63ac1c57d312fad996 Mon Sep 17 00:00:00 2001 From: Simon Yorkston Date: Wed, 15 Apr 2015 14:24:55 +0200 Subject: [PATCH] Final tweaks to regexp --- src/mfoc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mfoc.c b/src/mfoc.c index c03446a..1caf290 100644 --- a/src/mfoc.c +++ b/src/mfoc.c @@ -125,7 +125,7 @@ int main(int argc, char *const argv[]) ssize_t read; //Regexp declarations - static const char *regex = "(?i)([0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F])"; + static const char *regex = "([0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f])"; struct slre_cap caps[2]; // Parse command line arguments @@ -159,7 +159,7 @@ int main(int argc, char *const argv[]) int i, j = 0, str_len = strlen(line); while (j < str_len && - (i = slre_match(regex, line + j, str_len - j, caps, 2, 0)) > 0) { + (i = slre_match(regex, line + j, str_len - j, caps, 500, 1)) > 0) { //We've found a key, let's add it to the structure. p = realloc(defKeys, defKeys_len + 6); if (!p) {