I am using R in Ubuntu, and trying to go over list of files, some of them i need and some of them i don\'t need,
I try to get the one\'s i need by finding a sub string
we can try with ^ and $ to make sure that there is only a single 'a' in the string
^
$
grep("^a$", a) #[1] 1
It is not clear what the OP wanted.