library(stringr)

y <- ('a')

str_subset(string = y, regex(pattern = 'a\\b'))