Yes it is.

I will update the chapter on Regex.
Thank you Camillo

Jannik


2013/7/5 Camillo Bruni <camillobruni@gmail.com>
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.laval@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 <camillobruni@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.laval@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
>>
>>
>
>





--

~~Dr. Jannik�Laval~~
�cole des Mines de Douai
Enseignant-chercheur
http://www.jannik-laval.eu