Message-ID: <1503F860-54A4-402C-B6B5-C76A88EF2D5E@auckland.ac.nz>
Date: 2008-09-21T20:39:44Z
From: Rolf Turner
Subject: removing a word, the following space and the next word
In-Reply-To: <644e1f320809201015g5e934fa1m97fc2cae3a6cef74@mail.gmail.com>
On 21/09/2008, at 5:15 AM, jim holtman wrote:
>> x <- 'Mr Jones ate lunch and Mr Smith was tied'
>> gsub('(Mr\\.*)\\s+\\w+', "\\1 <file://0.0.0.1/> xxxx", x)
> [1] "Mr xxxx ate lunch and Mr xxxx was tied"
I don't get what the bit
<file://0.0.0.1/>
is about. If I do (just)
gsub('(Mr\\.*)\\s+\\w+', "\\1 xxxx", x)
I get the desired result, i.e.
[1] "Mr xxxx ate lunch and Mr xxxx was tied"
cheers,
Rolf Turner
######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}