On Mon, Sep 27, 2010 at 7:29 PM, Gabor Grothendieck
<[email protected]> wrote:
> Try this zero width negative look behind expression:
>
>> gregexpr("(?!a+)(b+)", "abcdaabbc", perl = TRUE)
> [[1]]
> [1] 2 7
> attr(,"match.length")
> [1] 1 2
Thanks Gabor, but this gives me the same result as
gregexpr("b+", "abcdaabbc", perl = TRUE)
which is wrong if the string is "abcdaabbcbbb".
Titus
______________________________________________
[email protected] 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.