[erlang-questions] comparing strings

Rodolfo Dias dias.rodolfo@REDACTED
Fri Dec 27 18:33:32 CET 2013


Thanks a lot,

     I suspected that \ was a escape, but I stayed confuse when I did

71> "nitro\\) opera".
"nitro\\) opera"

I expected see "nitro\) opera".


Best Regards
Rodolfo Dias


2013/12/27 Dmitry Kolesnikov <dmkolesnikov@REDACTED>

> Hello,
>
> make: *** No rule to make target `sense'.  Stop.
>
> \ is used as escape symbol at shell. \) is interpreted as )
> "nitro\\) opera" =:= "nitro) opera".
> false
>
> - Dmitry
>
> On Dec 27, 2013, at 5:11 PM, Rodolfo Dias <dias.rodolfo@REDACTED> wrote:
>
> > Hi all,
> >
> >    I am creating a module to extract some information from the User
> Agent (HTTP) and am checking the following situation.
> >
> > 21> "nitro\) opera" == "nitro) opera".
> > true
> > 22> "nitro\) opera" =:= "nitro) opera".
> > true
> > 23> string:equals("nitro\) opera", "nitro) opera").
> > true
> >
> > Make sense?
> >
> >
> > Rodolfo Dias
> >
> >
> >
> >
> > _______________________________________________
> > erlang-questions mailing list
> > erlang-questions@REDACTED
> > http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20131227/1f954385/attachment.htm>


More information about the erlang-questions mailing list