powered by
Wrap a word in word boundary (\\b) characters. Useful when combined with stringr::str_which() and stringr::str_detect() to match only entire words and not that word inside another word (e.g., "sting" and "testing").
\\b
stringr::str_which()
stringr::str_detect()
rx_break(pattern)
The a glue vector of pattern wrapped in \\b.
pattern
A regex pattern (a word) to wrap in \\b.
rx_break("test") rx_break(state.abb[1:5])
Run the code above in your browser using DataLab