Split dot and equa sign by recursive

I need to do a function which can split dot and equa by recursive.
But I don't have any ideas to do on recursive.

This is the example of my strings

Member.certPm=PM Certification
projects.risks.Index.flash_downloading=Downloading report, please wait..

The numbers of dot it is different. I need to split these strings and
set on hashes

Member => {certPm => PM Certification}
projects => {risks => {Index => {flash_downloading => Downloading
report, please wait..}}}

Do you have any guide for me to do this?

···

--
Posted via http://www.ruby-forum.com/.

Do I understand this correctly?

You have a string like this,

"projects.risks.Index.flash_downloading=Downloading report, please wait.."

and you want to produce this,

projects => {risks => {Index => {flash_downloading => Downloading
report, please wait..}}}

Is that what you want to do?

Harry

···

On Fri, Apr 22, 2011 at 7:52 PM, Siratinee Sukachai <ploy.sukachai@gmail.com> wrote:

I need to do a function which can split dot and equa by recursive.
But I don't have any ideas to do on recursive.

This is the example of my strings

Member.certPm=PM Certification
projects.risks.Index.flash_downloading=Downloading report, please wait..

The numbers of dot it is different. I need to split these strings and
set on hashes

Member => {certPm => PM Certification}
projects => {risks => {Index => {flash_downloading => Downloading
report, please wait..}}}

Do you have any guide for me to do this?

--

Siratinee Sukachai wrote in post #994481:

I need to do a function which can split dot and equa by recursive.
But I don't have any ideas to do on recursive.

Is this a homework question? Otherwise, why do you say you want to use a
recursive algorithm, but then say you don't know anything about
recursion?

A structure like :a => {:b => {:c => :d} } is nested. You do not need to
use recursion to build it.

···

--
Posted via http://www.ruby-forum.com/\.

I already found the solution.

thx

···

--
Posted via http://www.ruby-forum.com/.

Almost guaranteed. Google the email address.

···

On Apr 23, 2011, at 5:14, Brian Candler <b.candler@pobox.com> wrote:

Is this a homework question? Otherwise, why do you say you want to use a
recursive algorithm, but then say you don't know anything about
recursion?

Do I understand this correctly?

You have a string like this,

"projects.risks.Index.flash_downloading=Downloading report, please
wait.."

and you want to produce this,

projects => {risks => {Index => {flash_downloading => Downloading
report, please wait..}}}

Is that what you want to do?

Harry

Yes, that's what I want.

···

--
Posted via http://www.ruby-forum.com/\.

Yes, that's what I want.

What have you tried so far?

Harry