Fwd: [Pharo-project] Fwd: nice bug with regex
stephane ducasse <[email protected]> Thu, 5 Nov 2009 11:32:14 +0100
| Newsgroups | gmane.comp.lang.smalltalk.squeak.french |
|---|---|
| Message-ID | <[email protected]> |
vic voila la reponse Bientot dans pharo 1.1 Begin forwarded message: > From: Lukas Renggli <[email protected]> > Date: November 4, 2009 10:46:35 PM GMT+01:00 > To: Pharo-project-bM+ny+RY8h+a+bCvCPl5/[email protected] > Subject: Re: [Pharo-project] Fwd: nice bug with regex > Reply-To: Pharo-project-bM+ny+RY8h+a+bCvCPl5/[email protected] > > I committed VB-Regex-lr.34 to the PharoInbox that fixes this issue. > > In fact, this is a completely new port of VB-Regex with numerous > bug-fixes and enhancements. The bug you found was fixed in version > 1.1c in December 2004. The version 1.1 we used up to now was from > October 1999. > > The detailed log of changes from Vassily you can see below. > > Cheers, > Lukas > > Name: VB-Regex-lr.34 > Author: lr > Time: 4 November 2009, 10:40:27 pm > UUID: 9254d5aa-3e22-4e3b-83aa-2d633ff05570 > Ancestors: VB-Regex-StephaneDucasse.33 > > VERSION 1.2.3 (November 2007) > > 1. Regexs with ^ or $ applied to copy empty strings caused infinite > loops, e.g. ('' copyWithRegex: '^.*$' matchesReplacedWith: 'foo'). > Applied a similar correction to that from version 1.1c, to > #copyStream:to:(replacingMatchesWith:|translatingMatchesUsing:). > 2. Extended RxParser testing to run each test for > #copy:translatingMatchesUsing: as well as #search:. > 3. Corrected #testSuite test that a dot does not match a null, which > was passing by luck with Smalltalk code in a literal array. > 4. Added test to end of test suite for fix 1 above. > > VERSION 1.2.2 (November 2006) > > There was no way to specify a backslash in a character set. Now [\\] > is accepted. > > VERSION 1.2.1 (August 2006) > > 1. Support for returning all ranges (startIndex to: stopIndex) > matching a regex - #allRangesOfRegexMatches:, #matchingRangesIn: > 2. Added hint to usage documentation on how to get more information > about matches when enumerating > 3. Syntax description of dot corrected: matches anything but NUL =20 > since 1.1a > > VERSION 1.2 (May 2006) > > Fixed case-insensitive search for character sets. > > VERSION 1.1c (December 2004) > > Fixed the issue with #matchesOnStream:do: which caused infinite loops > for matches > that matched empty strings. > > VERSION 1.1b (November 2001) > > Changes valueNowOrOnUnwindDo: to ensure:, plus incorporates some =20 > earlier fixes. > > VERSION 1.1a (May 2001) > > 1. Support for keeping track of multiple subexpressions. > 2. Dot (.) matches anything but NUL character, as it should per =20 > POSIX spec. > 3. Some bug fixes. > > > > 2009/11/4 St=E9phane Ducasse <[email protected]>: >>> l :=3D '1=E8re partie\nmilieu\nfin'. >>> '.*' asRegex matchesIn l. >> >> -> infinite and freezing loop. >> >> Stef >> >> >> >> >> _______________________________________________ >> Pharo-project mailing list >> Pharo-project-bM+ny+RY8h+a+bCvCPl5/[email protected] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> > > > > --=20 > Lukas Renggli > http://www.lukas-renggli.ch > > _______________________________________________ > Pharo-project mailing list > Pharo-project-bM+ny+RY8h+a+bCvCPl5/[email protected] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project