View source: R/special_characters.R
rx_word | R Documentation |
Match a word—a string of word characters (a–z, A–Z, 0–9 or _).
This function is looks for tabs with the following expression: \w+
rx_word(.data = NULL)
.data |
Expression to append, typically pulled from the pipe |
rx_word()
# create an expression
x <- rx_word()
# create inputs
string1 <- "foo_bar"
string2 <- "foo-bar"
# extract matches
regmatches(string1, regexpr(x, string1))
regmatches(string2, regexpr(x, string2)) # doesn't match -
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.