From: Intransition Date: 2010-12-07T13:02:27+09:00 Subject: Re: Split version requirements On Dec 6, 10:55 pm, Intransition wrote: > Problem... > >   "rake >0.8 <1.0".split(/[^>=<]\s+/) >   => ["rak", ">0.", "<1.0"] > > How to do this without loosing the trailing character? Note also spaces after operators should be ok too. I.e. We want: "rake > 0.8 < 1.0".split(YOUR_REGEX) => ["rake", "> 0.8", "< 1.0"]