delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/05/17/04:09:58

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
From: e DOT j DOT pronk AT philips DOT com
To: <neillunn AT gunz DOT com DOT au>
Cc: <cygwin AT cygwin DOT com>
Subject: Re: perl 5.6.1 bug report
Message-ID: <0056890029702585000002L952*@MHS>
Date: Thu, 17 May 2001 10:07:20 +0200
MIME-Version: 1.0
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id EAA11272


neillunn AT gunz DOT com DOT au wrote:
> > > > > while ( $input =~ /(.*?)#/gsm ) {

> Actually it should be right in all perl 5.6.1 builds. Which leads me to say
> that I am actually not sure which one is the bug, but it is not a "cygwin"
> bug.

> Someone please correct me if I'm wrong on this but I thought (*?) with /s as
> a modifier would never match more than once. In fact, try the same string
> with no newlines and it should only match once.

This is from perlfaq6 - Regexes :

=====
I'm having trouble matching over more than one line. What's wrong?

Here's code that finds everything between START and END in a paragraph:

    undef $/;           # read in whole file, not just one line or
paragraph
    while ( <> ) {
        while ( /START(.*?)END/sm ) { # /s makes . cross line boundaries
            print "$1\n";
        }
    }
=====

Eddy

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019