Skip to content

Pass more info about matching mode to Regex engine #67980

@stephentoub

Description

@stephentoub

With Regex, we already had public API that only needed to know whether a match existed but no additional information about it (IsMatch). And #67794 added new public API that needs to know the bounds of the match, but not the full capture information from it. The NonBacktracking engine has to exert additional energy in computing capture information, so rather than just passing through a Boolean "quick" to the engine, it could be helpful to pass through an enum that would allow NonBacktracking to avoid the more expensive "compute captures" path if they won't be used anyway. Additionally, that information could make Tidy cheaper, as it needn't iterate through all captures fixing up their bounds nor balancing groups if capture information is going to be ignored.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions