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