Skip to content
Prev 360652 / 398503 Next

Grep command

Hi Steven,
If this is just a one-off, you could do this:

grepl("age",x) & nchar(x)<4

returning a logical vector containing TRUE for "age" but not "age2"

Jim
On Wed, May 4, 2016 at 3:45 PM, Steven Yen <syen04 at gmail.com> wrote: