list from a string

Robert Balogh <>
Mon Feb 16 13:02:15 CET 2004


Hej Ulf,

Thank you for your help...:-)

/Robi

>From: Ulf Wiger <>
>To: 
>Subject: Re: list from a string
>Date: Sun, 15 Feb 2004 22:52:06 +0100
>
>
>Erlang (BEAM) emulator version 5.3 [threads:0]
>
>Eshell V5.3  (abort with ^G)
>1> String = "[a,b,c]".
>"[a,b,c]"
>2> {ok,Tokens,_Line} = erl_scan:string(String ++ ".").
>{ok,[{'[',1},{atom,1,a},{',',1},{atom,1,b},{',',1},{atom,1,c},{']',1},{dot,1}],
>     1}
>3> erl_parse:parse_term(Tokens).
>{ok,[a,b,c]}
>4>
>
>On Sun, 15 Feb 2004 22:26:59 +0100, Robert Balogh <> 
>wrote:
>
>>Hej,
>>
>>Is it possible to get the list form this string?
>>This is the string: "[a,b,c]"
>>and I'd like to get back this list [a,b,c]
>>
>>thank you for your help,
>>regards,
>>/Robi
>>
>>_________________________________________________________________
>>Protect your PC - get McAfee.com VirusScan Online 
>>http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
>>
>
>
>
>--
>Ulf Wiger
>

_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE* 
http://join.msn.com/?page=features/junkmail




More information about the erlang-questions mailing list