Clarified \g and \k backreferences in Boost regex. - #897
Open
pbarney wants to merge 1 commit into
Open
Conversation
According to Boost's source code, \g and \k backreferences are synonymous. This edit removes any ambiguity that may remain in the reader's mind regarding when to use one or the other.
Contributor
|
If you must clarify these, then do it as a subpoint to the already existing bullet point, don't put your "caveat" before those symbols are defined. |
pryrt
reviewed
Aug 17, 2026
|
|
||
| * `(?<name>`_subset_`)` or `(?'name'`_subset_`)` ⇒ _Named Capture Group_: Names the value matched by _subset_ as the group _name_. Please note that group names are case-sensitive. | ||
|
|
||
| * `\g` and `\k` are functionally synonymous prefixes for _extended backreferences._ There is no semantic difference in Boost's implementation. They coexist for syntax-compatibility/historical reasons. |
Contributor
There was a problem hiding this comment.
Needs to be moved down... I would say move it after the For negative ℕ a few paragraphs down, and make it have the same indentation as that note.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
According to Boost's source code,
\gand\kbackreferences are synonymous. This edit removes any ambiguity that may remain in the reader's mind regarding when to use one or the other.Fixes #896