Uh oh!
There was an error while loading. Please reload this page.
add capture group name in comment - #63255
Conversation
ghost
commented
Jan 1, 2022
Tagging subscribers to this area: @dotnet/area-system-text-regularexpressions Issue DetailsFixes #62715
|
GSPP
commented
Jan 2, 2022
Can capture group names contain newline characters? That could break the code that's emitted. |
Newline characters are not valid inside group name. If you try it inside a console app, you will get a RegexParseException with message : "Invalid pattern '[regex]' Invalid group name: Group names must begin with a word character." |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
danmoseley
commented
Jan 3, 2022
That message is wrong, it should say "Invalid pattern '[regex]' Invalid group name: Group names must only contain word characters.". |
- Pass correct arguments into GroupNameFromNumber from RegexCode - Use capture group name for backreferences and backreference conditionals as well - Only render the group number if there is no name - Consistenly use the "capture group" suffix - Clean up GroupNameFromNumber to avoid duplicate string.Empty fallback cases - Fixes rendering of balancing groups
stephentoub
commented
Jan 11, 2022
Thanks, @pedrobsaila. I rebased your branch and pushed a commit to fix up a few things. Should be good to go once CI passes. |
Fixes#62715