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}}
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.