Fixing up the regex a tiny bit
This commit is contained in:
parent
c164f4acf8
commit
0b5960f575
|
@ -166,7 +166,7 @@ void reader::file::do_regex_search() {
|
|||
TODO:
|
||||
At the moment, it's also possible to construct situations in which there is a match present, but Polonius will not be able to find it.
|
||||
Consider the expression:
|
||||
[C-Z]{2}E
|
||||
([C-Z]{2})E
|
||||
Run on a file with the contents:
|
||||
0ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
With a block size of 4 bytes
|
||||
|
|
|
@ -173,7 +173,11 @@ std::vector<std::string> parse_regex(std::string expression) {
|
|||
curly_braces_received_comma = false;
|
||||
curly_braces_buffer += part;
|
||||
|
||||
parsed_expression[current_index] += curly_braces_buffer;
|
||||
if (multi_char_entry) {
|
||||
parsed_expression[current_index] += curly_braces_buffer;
|
||||
} else {
|
||||
parsed_expression.push_back(curly_braces_buffer);
|
||||
}
|
||||
|
||||
curly_braces_buffer = "";
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue