From koffice Fri Sep 01 14:09:12 2000 From: David Faure Date: Fri, 01 Sep 2000 14:09:12 +0000 To: koffice Subject: Re: patch: Perl again ;) X-MARC-Message: https://marc.info/?l=koffice&m=96782487908650 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.