From dietmar.schindler at manroland-web.com  Tue Apr 11 08:16:45 2017
From: dietmar.schindler at manroland-web.com (dietmar.schindler at manroland-web.com)
Date: Tue, 11 Apr 2017 06:16:45 +0000
Subject: [Rd] Bug report: POSIX regular expression doesn't match for
 somewhat higher values of upper bound
In-Reply-To: <22756.46504.29335.469599@stat.math.ethz.ch>
References: <2c87513c247b4e13b22f278e15a034d1@AUSMXMBX03.mrws.biz>
 <22756.46504.29335.469599@stat.math.ethz.ch>
Message-ID: <055edddea21747bab63200785953b819@AUSMXMBX04.mrws.biz>

> Von: Martin Maechler [mailto:maechler at stat.math.ethz.ch]
> Gesendet: Mittwoch, 5. April 2017 11:15
>
> >>>>>   <dietmar.schindler at 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.



[Rd] Bug report: POSIX regular expression doesn't match for somewhat higher values of upper bound
dietmar.schindler at manroland-web.com