Class Constants
Match a class of values. These are typically used in combination with
char_class
to create new character classes.
ALPHA ALNUM BLANK CNTRL DIGIT GRAPH LOWER PRINT PUNCT SPACE UPPER HEX_DIGIT ANY_CHAR GRAPHEME NEWLINE DGT WRD SPC NOT_DGT NOT_WRD NOT_SPC ASCII_DIGIT ASCII_LOWER ASCII_UPPER ASCII_ALPHA ASCII_ALNUM UNMATCHABLE
An object of class regex
(inherits from character
) of length 1.
ClassGroups
for the functional form,
SpecialCharacters
for regex metacharacters,
Anchors
for constants to match the start/end of a string,
WordBoundaries
for contants to match the start/end of a word.
# R character classes ALNUM ALPHA BLANK CNTRL DIGIT GRAPH LOWER PRINT PUNCT SPACE UPPER HEX_DIGIT # Special chars ANY_CHAR GRAPHEME NEWLINE # Generic classes DGT WRD SPC # Generic negated classes NOT_DGT NOT_WRD NOT_SPC # Non-locale-specific classes ASCII_DIGIT ASCII_LOWER ASCII_UPPER ASCII_ALPHA ASCII_ALNUM # An oxymoron UNMATCHABLE # Usage x <- c("a1 A", "a1 a") rx <- LOWER %R% DIGIT %R% SPACE %R% UPPER stringi::stri_detect_regex(x, rx)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.