B
Brian Nice
I have a strings like the following:
s1- "[1] Hello [2] bye"
s2- "[1] Hello [2] bye [2:1] continue [2] more"
I want to convert them to hashes like
h1- {1 => "Hello", 2 => "bye"}
h2- {1 => "Hello", 2 => "bye", "2:1" => "continue", "2:2" => more"}
Is there an easy Ruby way to do this?
Thanks for the help
Brian
s1- "[1] Hello [2] bye"
s2- "[1] Hello [2] bye [2:1] continue [2] more"
I want to convert them to hashes like
h1- {1 => "Hello", 2 => "bye"}
h2- {1 => "Hello", 2 => "bye", "2:1" => "continue", "2:2" => more"}
Is there an easy Ruby way to do this?
Thanks for the help
Brian