[erlang-questions] Why is it necessary to "double-escape" [ characters in regular expressions?

Zvi <>
Mon Mar 30 12:53:57 CEST 2009


Why type so many characters? when in doubt about escaping rules, try
something like this:

1> [[C]||C<-"\\q"].
["\\","q"]

2> [{C}||C<-"\\q"].
[{92},{113}]
 
Zvi


Gaspar Chilingarov wrote:
> 
> 6> lists:map(fun(X) -> erlang:display(X) end, "\\q").
> 92
> 113
> [true,true]
> 

-- 
View this message in context: http://www.nabble.com/Re%3A-Why-is-it-necessary-to-%22double-escape%22--%09characters-in-regular-expressions--tp22777475p22780162.html
Sent from the Erlang Questions mailing list archive at Nabble.com.




More information about the erlang-questions mailing list