Skip to content
Prev 360660 / 398503 Next

Grep command

Hi all
Both \\b and $ do the job. Thanks.
[1] "abc"  "def"  "rst"  "xyz"  "age"  "age2"
[1] 6
[1] 5
[1] 6
[1]


From: Jim Lemon <drjimlemon at gmail.com>
Date: Wed, May 4, 2016 at 2:19 AM
Subject: Re: [R] Grep command
To: Steven Yen <syen04 at gmail.com>


Does not:

abcplus<-c("zxzxabc","zxzxabc2rst")
grepl("abc",abcplus) & nchar(abcplus)<8

do the job?

Jim
On Wed, May 4, 2016 at 4:15 PM, Steven Yen <syen04 at gmail.com> wrote:
Message-ID: <CAKTtY6SR8d19WOL-S8bhxK7ju5EXyXEJo8r4ZtLotf2Tiyu4-g@mail.gmail.com>
In-Reply-To: <CA+8X3fXQq09T+qpJWQ1L-1a59_7Yg7bF4EdKNJPRN4EdoOzC0A@mail.gmail.com>