If a group in regex must always match (for example in "'(a-z*)'"), then start and end always return non-negative index for that group.
This would require analysis of the regular expression, associating it with the matcher, and using the information when start or end is called with a compile-time constant argument.
If a group in regex must always match (for example in
"'(a-z*)'"
), thenstart
andend
always return non-negative index for that group. This would require analysis of the regular expression, associating it with the matcher, and using the information whenstart
orend
is called with a compile-time constant argument.