The Erlang literal syntax for strings uses the "\" (backslash) character as an escape code. You need to escape backslashes in literal strings, both in your code and in the shell, with an extra backslash, that is, "\\".
re
re
Module
re
Module summary
Perl-like regular expressions for Erlang.
Description
This module contains regular expression matching functions for strings and binaries.
The regular expression
syntax and semantics resemble that of Perl.
The matching algorithms of the library are based on the PCRE library, but not all of the PCRE library is interfaced and some parts of the library go beyond what PCRE offers. The sections of the PCRE documentation that are relevant to this module are included here.
Note