Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #3405

How to split dot “.” only before equal “=”

From Sira PS <ploy.sukachai@gmail.com>
Newsgroups comp.lang.ruby
Subject How to split dot “.” only before equal “=”
Date 2011-04-23 12:05 -0500
Organization Service de news de lacave.net
Message-ID <18aacfcb7224df848f220e5e5c060ee9@ruby-forum.com> (permalink)

Show all headers | View raw


I need to split dot only before equal to assign to hash

e.g.

Project.risksPotentialAfterSum=Pot. aft.

result after split should be like this:

{Project=>{risksPotentialAfterSum=>Pot. aft.}}

for now I use str.split(/[.=]/,2) which is has a problem for the value
which comes after equal sign.

any ideas?

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

Back to comp.lang.ruby | Previous | NextNext in thread | Find similar | Unroll thread


Thread

How to split dot “.” only before equal  “=” Sira PS <ploy.sukachai@gmail.com> - 2011-04-23 12:05 -0500
  Re: How to split dot “.” only before  equal “=” 7stud -- <bbxx789_05ss@yahoo.com> - 2011-04-23 12:08 -0500
  Re: How to split dot “.” only before  equal “=” Sira PS <ploy.sukachai@gmail.com> - 2011-04-23 12:31 -0500
    Re: How to split dot “. ” only before equal “=” Roy Zuo <roylzuo@gmail.com> - 2011-04-23 12:38 -0500
      Re: How to split dot “.” only before equal “= ” Robert Dober <robert.dober@gmail.com> - 2011-04-24 02:33 -0500
        Re: How to split dot “.” only before equal “= ” Robert Dober <robert.dober@gmail.com> - 2011-04-24 03:09 -0500
    Re: How to split dot “.” only before  equal “=” 7stud -- <bbxx789_05ss@yahoo.com> - 2011-04-23 17:57 -0500
    Re: How to split dot “.” only before  equal “=” 7stud -- <bbxx789_05ss@yahoo.com> - 2011-04-25 16:27 -0500
      Re: How to split dot “.” only before  equal “=” 7stud -- <bbxx789_05ss@yahoo.com> - 2011-04-25 19:46 -0500
  Re: How to split dot “.” only before  equal “=” Sira PS <ploy.sukachai@gmail.com> - 2011-04-24 03:02 -0500

csiph-web