Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regex Capture Trees #38776

Closed
osamakawish opened this issue Jul 3, 2020 · 4 comments
Closed

Regex Capture Trees #38776

osamakawish opened this issue Jul 3, 2020 · 4 comments

Comments

@osamakawish
Copy link

osamakawish commented Jul 3, 2020

This is to simplify regex captures a little. Although this can be done on the side, it would be more efficiently done in the code behind.

Basically, each regex Capture should be treated as a type of a Match, with it's own captures which are in the form of an ordered list or a CaptureCollection.

This is mainly for captures containing captures, like "Email" : "((\w+)@(\w+).com)".

For "Email": "[email protected]", you'd have:

  1. [email protected]
    1.1. address
    1.2. gmail

Edit. It's worth clarifying that captures not containing captures would simply have an empty CaptureCollection.

@333fred
Copy link
Member

333fred commented Jul 3, 2020

This seems more like an API request. I'm going to move to the runtime repo.

@333fred 333fred transferred this issue from dotnet/csharplang Jul 3, 2020
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-System.Text.RegularExpressions untriaged New issue has not been triaged by the area owner labels Jul 3, 2020
@ghost
Copy link

ghost commented Jul 3, 2020

Tagging subscribers to this area: @eerhardt
Notify danmosemsft if you want to be subscribed.

@pgovind pgovind added this to the Future milestone Jul 8, 2020
@pgovind pgovind removed the untriaged New issue has not been triaged by the area owner label Jul 8, 2020
@pgovind pgovind added the api-suggestion Early API idea and discussion, it is NOT ready for implementation label Sep 15, 2020
@pgovind
Copy link

pgovind commented Apr 9, 2021

@osamakawish , would you able to come up with a more detailed API proposal with use cases and justifications? Some examples of recent API proposals are: #50902, #50389

@pgovind pgovind removed the api-suggestion Early API idea and discussion, it is NOT ready for implementation label Apr 9, 2021
@osamakawish
Copy link
Author

I think I'm over thinking this. It would be relatively easy to implement on your own and probably just as efficient performance-wise than I originally thought.

@ghost ghost locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants