> Von: Martin Maechler [mailto:maech...@stat.math.ethz.ch]
> Gesendet: Mittwoch, 5. April 2017 11:15
>
> >>>>>   <dietmar.schind...@manroland-web.com>
> >>>>>     on Tue, 4 Apr 2017 08:45:30 +0000 writes:
>
>     > Dear Sirs,
>     > while
>
>     >> regexpr('(.{1,2})\\1', 'foo')
>     > [1] 2
>     > attr(,"match.length")
>     > [1] 2
>     > attr(,"useBytes")
>     > [1] TRUE
>
>     > yields the correct match, an incremented upper bound in
>
>     >> regexpr('(.{1,3})\\1', 'foo')
>     > [1] -1
>     > attr(,"match.length")
>     > [1] -1
>     > attr(,"useBytes")
>     > [1] TRUE
>
>     > incorrectly yields no match.
>
> Hmm, yes, I would also say that this is incorrect
> (though I'm always cautious: The  ?regex  help page explicitly
>  mentions greedy repetitions, and these can "bite you" ..)
>
> The behavior is also different from the  perl=TRUE one which is
> correct (according to the above understanding).
>
> ...

Shouldn't this be submitted on R's Bugzilla then (which I as a non-member 
can't)?
--
Best regards,
Dietmar Schindler
________________________________
manroland web systems GmbH -- Managing Director: Alexander Wassermann
Registered Office: Augsburg -- Trade Register: AG Augsburg -- HRB-No.: 26816 -- 
VAT: DE281389840

Confidentiality note:
This eMail and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you are not the intended recipient, you are hereby notified that any use or 
dissemination of this communication is strictly prohibited. If you have 
received this eMail in error, then please delete this eMail.

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

Reply via email to