Re: [Pharo-users] Regex question
I think that is highly implementation dependent. I guess in this case the Regex matches multilines? On 2013-07-05, at 07:51, "jannik.laval" wrote: > Yes, now in the chapter on Regex, it is written that '.' matches only a > single character except cr. > > So, the command "String cr matchesRegex: '.'" should return false in this > case. > But since at least Pharo1.3 (I don't try previous version), it returns true. > > Jannik > > > > On Jul 5, 2013, at 12:33 AM, Camillo Bruni wrote: > >> Yes this is ok, '.' matches only a single character. >> The alternatives you might be looking for are #prefixMatchesRegex: or '.*' >> >> On 2013-07-05, at 00:03, "jannik.laval" wrote: >>> Hi guys, >>> >>> Just a simple question about regex: >>> >>> 'a' matchesRegex: '.' --> true >>> 'aa' matchesRegex: '.' --> false >>> >>> As '.' represents any character, the two previous lines are ok. Now, if I >>> test with a cr, it returns true: >>> >>> String cr matchesRegex: '.' --> true. >>> >>> Is it the expected behavior ? >>> >>> Cheers, >>> Jannik >> >> > >
Re: [Pharo-users] Regex question
Yes it is. I will update the chapter on Regex. Thank you Camillo Jannik 2013/7/5 Camillo Bruni > I think that is highly implementation dependent. I guess in this case the > Regex matches multilines? > > On 2013-07-05, at 07:51, "jannik.laval" wrote: > > Yes, now in the chapter on Regex, it is written that '.' matches only a > single character except cr. > > > > So, the command "String cr matchesRegex: '.'" should return false in > this case. > > But since at least Pharo1.3 (I don't try previous version), it returns > true. > > > > Jannik > > > > > > > > On Jul 5, 2013, at 12:33 AM, Camillo Bruni > wrote: > > > >> Yes this is ok, '.' matches only a single character. > >> The alternatives you might be looking for are #prefixMatchesRegex: or > '.*' > >> > >> On 2013-07-05, at 00:03, "jannik.laval" wrote: > >>> Hi guys, > >>> > >>> Just a simple question about regex: > >>> > >>> 'a' matchesRegex: '.' --> true > >>> 'aa' matchesRegex: '.' --> false > >>> > >>> As '.' represents any character, the two previous lines are ok. Now, > if I test with a cr, it returns true: > >>> > >>> String cr matchesRegex: '.' --> true. > >>> > >>> Is it the expected behavior ? > >>> > >>> Cheers, > >>> Jannik > >> > >> > > > > > > > -- ~~Dr. Jannik Laval~~ École des Mines de Douai Enseignant-chercheur http://www.jannik-laval.eu
Re: [Pharo-users] documentation for refactoring tools in Pharo 2
On Thu, Jul 4, 2013 at 5:11 PM, Paul DeBruicker wrote: > Camillo and I deteremined that its probably a Nautilus bug that prevents > the "Code Rewriting" tools from working in Pharo 2 (I'm using 20606) > from within the browser (see > > http://forum.world.st/how-to-use-RBClassRegexRefactoring-in-Pharo-2-td4695780.html > ). > But in 1.4 you could use Omnibrowser & the Code rewriting tools. > the issue for Pharo 3.0 is https://pharo.fogbugz.com/default.asp?7215. Feel free to backport the change to 2.0. -- Damien Cassou http://damiencassou.seasidehosting.st "Success is the ability to go from one failure to another without losing enthusiasm." Winston Churchill