simplify the computation of matched sub-expressions

It seems that boost::bind ain't friendly with boost::regex_iterator
but anyway, there was a much simpler way to get the number
of matched sub-expressions