From 255af9e1103257beb3a980b1095b399e48b8095e Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Wed, 7 Sep 2011 00:39:02 -0400 Subject: [PATCH] Nibbler - Removed unnecessary addition of capturing parentheses to a regex. --- src/Nibbler.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/Nibbler.cpp b/src/Nibbler.cpp index b50ddf7f0..50752756a 100644 --- a/src/Nibbler.cpp +++ b/src/Nibbler.cpp @@ -142,13 +142,7 @@ bool Nibbler::getUntilRx (const std::string& regex, std::string& result) { if (_cursor < _length) { - std::string modified_regex; - if (regex[0] != '(') - modified_regex = "(" + regex + ")"; - else - modified_regex = regex; - - RX r (modified_regex, true); + RX r (regex, true); std::vector start; std::vector end; if (r.match (start, end, _input.substr (_cursor)))