microsoft / microsoft/STL

`<regex>`: Remove nodes for capturing group 0 from the NFA

Open
#6,025 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

performance regex vNext
Dominant language
C++
Stars
11.1k
Forks
1.7k
Avg merge
4d 15h
Merged PRs (30d)
22

Description

Recent versions of the matcher skip the NFA nodes of type _N_capture and _N_end_capture for storing the start and end iterators of capturing group 0. We should remove these nodes from the NFA.

This change will have to wait until vNext because old versions of the matcher do use the _N_capture node to compute capturing group 0.

vNext note: Resolving this issue will require breaking binary compatibility. We won't be able to accept pull requests for this issue until the vNext branch is available. See https://github.com/microsoft/STL/issues/169 for more information.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

This change is blocked until the vNext branch is available, as it requires breaking binary compatibility. Start by examining the matcher’s handling of _N_capture and _N_end_capture nodes; done means removing the capturing-group-0 nodes from the NFA while preserving the matcher’s behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
devtools
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.