Full_Name: FAN
Version: 2.4.0
OS: Windows
Submission from: (NULL) (159.50.101.9)


These are expected:

> grep("[\-|c]", c("a-a","b"))
[1] 1

> gsub("[\-|c]", "&", c("a-a","b"))
[1] "a&a" "b"  

but these are strange:

> grep("[d|\-|c]", c("a-a","b"))
integer(0)

> gsub("[d|\-|c]", "&", c("a-a","b"))
[1] "a-a" "b"  

Thanks

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to