意外的grepl行为:按某些字符串返回false
我对grepl(和grep)有着丰富的经验意外的grepl行为:按某些字符串返回false,r,regex,R,Regex,我对grepl(和grep)有着丰富的经验 怎么了?我想您正在寻找: grepl("[[:alpha:]]","spring") [1] TRUE grepl("[[:alpha:]]","svd") [1] TRUE 你的意思是grepl(“[:alpha:][]”,“svg”)? grepl("[[:alpha:]]","spring") [1] TRUE grepl("[[:alpha:]]","svd") [1] TRUE
怎么了?我想您正在寻找:
grepl("[[:alpha:]]","spring")
[1] TRUE
grepl("[[:alpha:]]","svd")
[1] TRUE
你的意思是grepl(“[:alpha:][]”,“svg”)
?
grepl("[[:alpha:]]","spring")
[1] TRUE
grepl("[[:alpha:]]","svd")
[1] TRUE