From ripley at stats.ox.ac.uk  Thu Oct 11 10:47:10 2007
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Thu, 11 Oct 2007 09:47:10 +0100 (BST)
Subject: [Rd] gregexpr (PR#9965)
In-Reply-To: <20071010143544.1B484288008C@mail.pubhealth.ku.dk>
References: <20071010143544.1B484288008C@mail.pubhealth.ku.dk>
Message-ID: <Pine.LNX.4.64.0710110942210.14648@gannet.stats.ox.ac.uk>

This was a deliberate change for R 2.4.0 with SVN log:

r38145 | rgentlem | 2006-05-20 23:58:14 +0100 (Sat, 20 May 2006) | 2 lines
fixing gregexpr infelicity

So it seems the author of gregexpr believed that the bug was in 2.3.1, not 
2.5.1.

On Wed, 10 Oct 2007, dolanp at science.oregonstate.edu wrote:

> Full_Name: Peter Dolan
> Version: 2.5.1
> OS: Windows
> Submission from: (NULL) (128.193.227.43)
>
>
> gregexpr does not find all matching substrings if the substrings overlap:
>
>> gregexpr("abab","ababab")
> [[1]]
> [1] 1
> attr(,"match.length")
> [1] 4
>
> It does work correctly in Version 2.3.1 under linux.

'correctly' is a matter of definition, I believe: this could be considered 
to be vaguely worded in the help.

> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



[Rd] gregexpr (PR#9965)
Prof Brian Ripley