On Mon, 30 Jun 2014 11:13:18 PM Jim Lemon wrote:
> Hi all,
> I have managed, with the help of glob2rx() to get two parts of a text
> manipulation working. I have successfully gotten rid of the first and
> second bits, but I have hit the wall trying to get rid of the last bit.
> Here's an example:
>
Hi Jim,
May be this helps:
library(stringr)
paste(str_extract_all(initString,
perl('(?<=\\:)[[:alnum:]]+,?'))[[1]],collapse="")
#[1] "value1,value2"
A.K.
On Monday, June 30, 2014 9:58 AM, Jim Lemon wrote:
Hi all,
I have managed, with the help of glob2rx() to get two parts of a text
manipula
If everything Regular Expressions could do could be done with globbing then RE
would likely not exist.
I have interpreted your problem as:
Start at the beginning of the string ("^")
match stuff that is not a colon ("[^:]")
match a colon (":')
keep stuff that is not a comma ("([^,]*)")
match a co
ew England
Armidale NSW 2351
Email: home: mac...@northnet.com.au
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Jim Lemon
Sent: Monday, 30 June 2014 23:13
To: r-help@r-project.org
Subject: [R] yet another regular expression
Hi all,
I have m
Hi all,
I have managed, with the help of glob2rx() to get two parts of a text
manipulation working. I have successfully gotten rid of the first and
second bits, but I have hit the wall trying to get rid of the last bit. Here's
an example:
initString<-
"\"Delete this\":value1,\"Delete this too\
5 matches
Mail list logo