Regex::Regex(const string &expr)
{
- n_groups = 0;
auto iter = expr.begin();
code = compile(expr, iter, n_groups, false);
++n_groups;
Count repeat_min = 1;
Count repeat_max = 1;
- parse_repeat(expr, i, repeat_min, repeat_max);
+ if(i!=end)
+ parse_repeat(expr, i, repeat_min, repeat_max);
for(unsigned j=0; j<repeat_min; ++j)
result += atom;