MCPcopy Create free account
hub / github.com/davidblewett/rure-python / is_capture_char

Function is_capture_char

regex/regex-syntax/src/ast/parse.rs:112–115  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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).
112fn 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///

Callers 1

parse_capture_nameMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected