Returns true if the given character is a valid in a capture group name. If `first` is true, then `c` is treated as the first character in the group name (which is not allowed to be a digit).
(c: char, first: bool)
| 110 | /// If `first` is true, then `c` is treated as the first character in the |
| 111 | /// group name (which is not allowed to be a digit). |
| 112 | fn is_capture_char(c: char, first: bool) -> bool { |
| 113 | c == '_' || (!first && c >= '0' && c <= '9') |
| 114 | || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') |
| 115 | } |
| 116 | |
| 117 | /// A builder for a regular expression parser. |
| 118 | /// |