Match a whitespace character.
whitespace(.data = NULL)
.data | Expression to append, typically pulled from the pipe |
---|
Match a whitespace character (one of space, tab, carriage return,
new line, vertical tab and form feed). This function is looks for tabs with
the following expression: \d
carriage return: https://codepoints.net/U+000D
new line: https://codepoints.net/U+000
vertical tab: https://codepoints.net/U+000B
form feed: https://codepoints.net/U+000C
whitespace()#> [1] "\\s"# create an expression x <- whitespace() # create input string <- "1 apple" # extract match regmatches(string, regexpr(x, string))#> [1] " "