Skip to content

proposal: regexp: support \C to match a single byte #52632

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

Closed
syinwu opened this issue Apr 30, 2022 · 6 comments
Closed

proposal: regexp: support \C to match a single byte #52632

syinwu opened this issue Apr 30, 2022 · 6 comments

Comments

@syinwu
Copy link

syinwu commented Apr 30, 2022

I wonder if plan to support \C to match a single byte?

@gopherbot gopherbot added this to the Proposal milestone Apr 30, 2022
@ianlancetaylor
Copy link
Member

Are there any other regular expression variants that support that?

@syinwu
Copy link
Author

syinwu commented May 2, 2022

I didn't see any other regular expression variants of golang that support \C. I see the use of it in the syntax wiki of re2.

@rsc
Copy link
Contributor

rsc commented May 4, 2022

There are no plans, because it requires operating one byte at a time, and the regexp implementation is fundamentally rune-at-a-time.

@rsc
Copy link
Contributor

rsc commented May 4, 2022

This proposal has been added to the active column of the proposals project
and will now be reviewed at the weekly proposal review meetings.
— rsc for the proposal review group

@ianlancetaylor
Copy link
Member

Closing as infeasible.

@rsc
Copy link
Contributor

rsc commented May 11, 2022

This proposal has been added to the active column of the proposals project
and will now be reviewed at the weekly proposal review meetings.
— rsc for the proposal review group

@rsc rsc moved this to Declined in Proposals Aug 10, 2022
@rsc rsc added this to Proposals Aug 10, 2022
@rsc rsc removed this from Proposals May 10, 2023
@golang golang locked and limited conversation to collaborators May 11, 2023
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