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" <jannik.la...@gmail.com> 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 <camillobr...@gmail.com> 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" <jannik.la...@gmail.com> 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 >> >> > >