-
Notifications
You must be signed in to change notification settings - Fork 443
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
capture: support [, ] and . in capture group names
This slightly expands the set of characters allowed in capture group names to be `[][_0-9A-Za-z.]` from `[_0-9A-Za-z]`. This required some delicacy in order to avoid replacement strings like `$Z[` from referring to invalid capture group names where the intent was to refer to the capture group named `Z`. That is, in order to use `[`, `]` or `.` in a capture group name, one must use the explicit brace syntax: `${Z[}`. We clarify the docs around this issue. Regretably, we are not much closer to handling #595. In order to support, say, all Unicode word characters, our replacement parser would need to become UTF-8 aware on `&[u8]`. But std makes this difficult and I would prefer not to add another dependency on ad hoc UTF-8 decoding or a dependency on another crate. Closes #649
- Loading branch information
1 parent
96456dd
commit e1e3692
Showing
6 changed files
with
111 additions
and
31 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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