How to remove quotation marks
Ulf Wiger
etxuwig@REDACTED
Mon May 27 09:17:28 CEST 2002
1> List = "[{hello1}, {hello2}]".
"[{hello1}, {hello2}]"
2> {ok,Tokens,_} = erl_scan:string(List ++ ".").
{ok,[{'[',1},
{'{',1},
{atom,1,hello1},
{'}',1},
{',',1},
{'{',1},
{atom,1,hello2},
{'}',1},
{']',1},
{dot,1}],
1}
3> erl_parse:parse_term(Tokens).
{ok,[{hello1},{hello2}]}
/Uffe
On Mon, 27 May 2002, Faustin Ngokse wrote:
>Hi erlang friends,
>
>I don't know if some of you solved this problem before;
>I have an erlang term enclosed in quotation marks and I just
>want to remove the quotation marks.
>Does anyone know an elegant way how to do that?
>
>example:
>How to transform
>List = "[{hello1}, {hello2}]"
>into
>Term = [{hello1}, {hello2}]
>
>Thanks in advance
>/// Faustin
>
>
--
Ulf Wiger, Senior Specialist,
/ / / Architecture & Design of Carrier-Class Software
/ / / Strategic Product & System Management
/ / / Ericsson Telecom AB, ATM Multiservice Networks
More information about the erlang-questions
mailing list