Skip to content
Prev 198836 / 398503 Next

partial matching with grep()

Try

    grep( "\\.x$", c("a.x" ,"b.x","a.xx"),value=TRUE)

The $ means end-of-line (while ^ means start-of-line). And special 
characters like dot needs to be escaped twice.

Regards, Adai
Vito Muggeo (UniPa) wrote: