![]() ![]() Can only be used in a bracket expression. ![]() Matches one character from a POSIX character class. matches one of 0 through 9 or a through z Reduces the character class to the characters present in both “base” and “intersect”. ] matches a single letter that is not a vowel. Removes all characters in the “subtract” class from the “base” class. ef ] is the same as and matches any letter between a and f. ef] matches aef], bef],, cef], and def]Īn opening square bracket inside a character class begins a nested character class. matches x (any character except a, b, c or d)Īn opening square bracket is a literal character that adds an opening square bracket to the character class. Negates the character class, causing it to match a single character not listed in the character class. ^ (caret) immediately after the opening [ (hyphen) between two tokens that each specify a single character.Īdds a range of characters to the character class. Unless otherwise noted, the syntax on this page is only valid inside character classes, while the syntax on all other reference pages is not valid inside character classes.Īll characters except the listed special characters are literal characters that add themselves to the character class.Ī backslash escapes special characters to suppress their special meaning.Ī backslash is a literal character that adds a backslash to the character class. Inside a character class, different rules apply. ![]() red squiggly lines and such) to the pyproject.toml or pytest.ini source of the faulty patterns, but that'll have to come in the future. Ideally, the plugin would add annotations (i.e. When used outside a character class, [ begins a character class. Oh, and I also made it handle unclosed character classes gracefully by treating such patterns as 'match nothing'. Regular Expression Reference: Character Classes ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |