Message from discussion
S5 and overlap
Newsgroups: perl.perl6.language
Path: g2news1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.perl.org
Return-Path: <philipp.ma...@bmlv.gv.at>
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 (63.251.223.170)
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
Delivered-To: perl6-langu...@perl.org
Received: (qmail 21149 invoked by alias); 21 Sep 2004 10:37:15 -0000
X-Spam-Status: No, hits=-4.9 required=8.0
tests=BAYES_00
X-Spam-Check-By: la.mx.develooper.com
Received: from mail.bmlv.gv.at (HELO mail.bmlv.gv.at) (193.171.152.37)
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)
To: perl6-langu...@perl.org
Subject: Re: S5 and overlap
Date: Tue, 21 Sep 2004 12:37:09 +0200
User-Agent: KMail/1.7
References: <200409211233.40984.philipp.marek@bmlv.gv.at>
In-Reply-To: <200409211233.40984.philipp.marek@bmlv.gv.at>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-ID: <200409211237.09329.philipp.marek@bmlv.gv.at>
Approved: n...@nntp.perl.org
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?
Regards,
Phil