> Is there a way to allow the regex '.' (dot) to match line break
characters:
> 'hello regex' matchesRegex: '.*regex'    "true"
> 'hello
> regex' matchesRegex: '.*regex'    "false"


> In my image the second expression returns true as well.
>
> In fact the '.' (dot) matches anything but the null character (see
> RxMatcher>>#syntaxAny).


Thanks - I shouldn't make assumptions - it matches in Pharo but not in
Gemstone - I assumed the implementations would be identical.

As you say the culprit is RxMatcher>>#syntaxAny

In Pharo:

RxMatcher>>#syntaxAny
^RxmPredicate new
predicate: [:char | char asInteger ~= 0]


In Gemstone:

RxMatcher>>#syntaxAny
^RxmPredicate new
predicate: [:char | (Cr = char or: [Lf = char]) not]

Nick
_______________________________________________
Pharo-project mailing list
Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to