Description Usage Arguments Examples
View source: R/special_characters.R
Matches punctuation characters only:
! \" # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~
.
1 | rx_punctuation(.data = NULL, inverse = FALSE)
|
.data |
Expression to append, typically pulled from the pipe |
inverse |
Invert match behavior, defaults to |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | rx_punctuation()
rx_punctuation(inverse = TRUE)
# create an expression
x <- rx_punctuation()
# create input
string <- 'Apple 1!'
# extract match
regmatches(string, gregexpr(x, string))
# dont extract punctuation
y <- rx_punctuation(inverse = TRUE)
regmatches(string, gregexpr(y, string))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.