[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice
Subject:    Re: patch: Perl again ;)
From:       David Faure <david () mandrakesoft ! com>
Date:       2000-09-01 14:09:12
[Download RAW message or body]

At 07:26 31/08/00 +0200, you wrote:
>The default setting for those REs is that they are "greedy."
>This means they try to match as much as the can.
>For example:
>Without that .*? matching this line:
>
>a="x" b="y" c="z"
>
>would result in x" b="y" c="z.

Yes, funny that you give an example since it's the same one as
the one I gave :)

>However - this ? makes the RE non-greedy. This means it matches
>only as much as it "has" to. In this case this would simply
>result in:
>x

Wow, good to know.

>That's exactly what we want here (and above ;)
Yes, and it's much more readable than my version, once you know
what the '?' does.
Please commit your version :-)
David.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic