regex - alphanumeric regular expression in R -
i trying use [:alnum:] explained on ?regex
anyone knows why
grepl("^([a-za-z0-9])+([;])", x="dj5sads;adsa")
returns true,
grepl("^([:alnum:])+([;])", x="dj5sads;adsa")
returns false?
[:alnum:]
name of class. want put named class character class, have enclose pair of []
:
[[:alnum:]]
in example it'd be
grepl("^([[:alnum:]])+([;])", x="dj5sads;adsa") //output: true
Comments
Post a Comment