RegularExpression: A few small features for CMake
This MR adds a few small features for implementing cmake/cmake#26629 (closed).
- An
options
parameter toRegularExpression::find()
with two options. - A new method
num_groups()
that counts capture subgroups. - Less overloads and more null checks for RegularExpressionMatch::start/end/match mehtods.
Only one of those features (the BOL_AT_OFFSET option) is needed for cmake/cmake!10221 (merged). I can make it a separate MR if you wish.