[erlang-questions] Re: How to remove \ from string

Ahmed Omar spawn.think@REDACTED
Wed Apr 6 18:16:13 CEST 2011


re:replace(S,["\""],"",[global, {return,list}]).
"{get,user,wilson,lname}"


On Wed, Apr 6, 2011 at 6:07 PM, Gianfranco Alongi <
gianfranco.alongi@REDACTED> wrote:

>
> [X||X<-"{get,\"user\",\"wilson\",\"lname\"}",X=/=$\\,X=/=$"].
>
> "{get,user,wilson,lname}"
>
>
> ----- Original Message -----
> From: "Wes James" <comptekki@REDACTED>
> To: "Muhammad Yousaf" <muhammad.yousaf@REDACTED>
> Cc: erlang-questions@REDACTED
> Sent: Wednesday, 6 April, 2011 17:04:11 GMT +00:00 GMT Britain, Ireland,
> Portugal
> Subject: [erlang-questions] Re: How to remove \ from string
>
> On Wed, Apr 6, 2011 at 9:51 AM, Muhammad Yousaf
> <muhammad.yousaf@REDACTED> wrote:
> > Hi,
> > I have a string
> > "{get,\"user\",\"wilson\",\"lname\"}"
> > i want to remove all " \" from the above string how can i do that ??
> > i tried re:replace but is not working any help will be appreciated
> > thanks
> > Regards,
> > Muhammad Yousaf
>
> Just one of probably many ways:
>
> 1> A="{get,\"user\",\"wilson\",\"lname\"}".
> "{get,\"user\",\"wilson\",\"lname\"}"
> 2> A--"\"\"\"\"\"\"".
> "{get,user,wilson,lname}"
>
> -wes
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>



-- 
Best Regards,
- Ahmed Omar
http://nl.linkedin.com/in/adiaa
Follow me on twitter
@spawn_think <http://twitter.com/#!/spawn_think>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110406/68c86483/attachment.htm>


More information about the erlang-questions mailing list