Message from discussion S5 and overlap
Mailing-List: contact perl6-language-h...@perl.org; run by ezmlm
Delivered-To: mailing list perl6-langu...@perl.org
Received: (qmail 27595 invoked from network); 21 Sep 2004 10:37:16 -0000
Received: from x1.develooper.com (188.8.131.52)
by lists.develooper.com with SMTP; 21 Sep 2004 10:37:16 -0000
Received: (qmail 21153 invoked by uid 225); 21 Sep 2004 10:37:15 -0000
Received: (qmail 21149 invoked by alias); 21 Sep 2004 10:37:15 -0000
X-Spam-Status: No, hits=-4.9 required=8.0
Received: from mail.bmlv.gv.at (HELO mail.bmlv.gv.at) (184.108.40.206)
by la.mx.develooper.com (qpsmtpd/0.27.1) with ESMTP; Tue, 21 Sep 2004 03:37:13 -0700
Received: from localhost (localhost [127.0.0.1])
by mail.bmlv.gv.at (mail) with ESMTP id EA0317F488
for <perl6-langu...@perl.org>; Tue, 21 Sep 2004 12:37:09 +0200 (CEST)
Subject: Re: S5 and overlap
Date: Tue, 21 Sep 2004 12:37:09 +0200
From: philipp.ma...@bmlv.gv.at (Ph. Marek)
> > # With the new :ov (:overlap) modifier, the current rule will match at
> > all possible character positions (including overlapping) and return all
> > matches in a list context, or a disjunction of matches in a scalar
> > context. The first match at any position is returned.
> > $str = "abracadabra";
> > @substrings = $str ~~ m:overlap/ a (.*) a /;
> > # bracadabr cadabr dabr br
> Maybe I'm wrong here, but I'd get
Just found the answer, sorry.
But that gets me to the next question, ie I don't understand the difference
between exhaustive and overlap.
Is it that overlap fixes the first point of the pattern match and does further
scanning for all possibilities, and exhaustive then *after* this processing
searches for another first point?