Re: [R] gsubfn, strapply, REGEX Problem

2008-10-28 Thread Johannes Graumann
Thank you! Joh Gabor Grothendieck wrote: > Have just made an improvement to the development > version to ignore escaped left parens in the regexp > in setting the backref default. This improvement > should address your problem so that this now > works without errors: > > library(gsubfn) > # o

Re: [R] gsubfn, strapply, REGEX Problem

2008-10-28 Thread Gabor Grothendieck
Have just made an improvement to the development version to ignore escaped left parens in the regexp in setting the backref default. This improvement should address your problem so that this now works without errors: library(gsubfn) # overwrite relevant function with devel version of it source("h

Re: [R] gsubfn, strapply, REGEX Problem

2008-10-28 Thread Gabor Grothendieck
The default has changed to be the negative of its prior value so that would account for it. The current default is backref = -k where k is the number of left parens in the regexp. That means that it passes only the back references (and not the match) if it thinks there are any backreferences. Us

Re: [R] gsubfn, strapply, REGEX Problem

2008-10-28 Thread Johannes Graumann
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Thanks for looking at this. The "\"" was an oversight for the example, but the "backref" bit solves my problem ... I wonder whether that used to be the default and was recently changed? Thanks for your help! Joh Gabor Grothendieck wrote: > Ther

Re: [R] gsubfn, strapply, REGEX Problem

2008-10-28 Thread Gabor Grothendieck
There is no quote terminating the first argument and you need to add the backref = 0 argument so that it does not interpret the parentheses in the regular expression as back references. Its not clear to me what the intention is here so there may be further changes needed but the ones above result