[erlang-questions] unexpected matching in re 12B5

Gleb Peregud gleber.p@REDACTED
Tue Feb 17 20:30:29 CET 2009

On Tue, Feb 17, 2009 at 20:26, Attila Babo <babo.online@REDACTED> wrote:
> Let me reply from a quote from the very same document:
> The Erlang literal syntax for strings give special meaning to the "\"
> (backslash) character. To literally write a regular expression or a
> replacement string containing a backslash in your code or in the
> shell, two backslashes have to be written: "\\".

It turns out that \s is parsed as a character with ASCII code 32 - i.e. a space.

> io:fwrite("~b~n", [hd("\s")]).

Gleb Peregud

More information about the erlang-questions mailing list