[erlang-questions] dots in regexps

David Mercer dmercer@REDACTED
Tue Mar 30 16:41:51 CEST 2010


On Tuesday, March 30, 2010, Dmitry Belayev wrote:
> Then why first .* is greedy and last one is not?

The last one *is* greedy.  When he adds it into his regexp, it matches the
entire rest of the string.

Regexp ".*foo(...)" matches "123foobar".

Regexp  ".*foo(...).*" matches "123foobar456".



More information about the erlang-questions mailing list