From: Roy Zuo Date: 2011-04-24T02:38:03+09:00 Subject: Re: How to split dot “.” only before equal “=” You need regex lookahead syntax ruby-1.9.2-head > str.split( /\.(?=[^=]*=)/ ) => ["Project", "risksPotentialAfterSum=Pot. aft."] Roy On Sun, Apr 24, 2011 at 02:31:22AM +0900, Sira PS wrote: > 7stud, > > actually i need to split dot before equal sign except after equal sign > > the values i need are > > Project > risksPotentialAfterSum > Pot. aft. > > can i split it the get these result in the same time? > > -- > Posted via http://www.ruby-forum.com/. > -- ____________________________________________________________________ / It now costs more to amuse a child than it once did to educate his \ \ father. / -------------------------------------------------------------------- \ ,__, \ (oo)____ (__) )\ ||--|| *