From: Ryan Davis Date: 2012-11-22T07:02:14+09:00 Subject: Re: check string format Parsing homework? On Nov 21, 2012, at 4:54, ariv arasan wrote: > i have a string > str='{ "first" => "val", "second" => { "a" => "aaa", "b" => "bbbb" }, > 3=>"three"}' > i want to make an array from the string which should be like > arr = ["first => val", "second => { a => aaa , b => bbbb }", "3=>three"] > for that first,i want to check the string format, > => or => > how could i achieve this? > main purpose is to make the string as a hash(not by using eval) > > -- > Posted via http://www.ruby-forum.com/. >