Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.ruby > #3410
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeder1.enfer-du-nord.net!talisker.lacave.net!lacave.net!not-for-mail |
|---|---|
| From | Roy Zuo <roylzuo@gmail.com> |
| Newsgroups | comp.lang.ruby |
| Subject | Re: How to split dot “. ” only before equal “=” |
| Date | Sat, 23 Apr 2011 12:38:03 -0500 |
| Organization | Service de news de lacave.net |
| Lines | 34 |
| Message-ID | <20110423173737.GA27274@bender> (permalink) |
| References | <18aacfcb7224df848f220e5e5c060ee9@ruby-forum.com> <2bcb1fea255cf99800791245bd83bfac@ruby-forum.com> |
| NNTP-Posting-Host | bristol.highgroove.com |
| Content-Type | text/plain; charset=utf-8 |
| X-Trace | talisker.lacave.net 1303580610 81725 65.111.164.187 (23 Apr 2011 17:43:30 GMT) |
| X-Complaints-To | abuse@lacave.net |
| NNTP-Posting-Date | Sat, 23 Apr 2011 17:43:30 +0000 (UTC) |
| In-Reply-To | <2bcb1fea255cf99800791245bd83bfac@ruby-forum.com> |
| X-Received-From | This message has been automatically forwarded from the ruby-talk mailing list by a gateway at comp.lang.ruby. If it is SPAM, it did not originate at comp.lang.ruby. Please report the original sender, and not us. Thanks! For more details about this gateway, please visit: http://blog.grayproductions.net/categories/the_gateway |
| X-Mail-Count | 382097 |
| X-Ml-Name | ruby-talk |
| X-Rubymirror | Yes |
| X-Ruby-Talk | <20110423173737.GA27274@bender> |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.ruby:3410 |
Show key headers only | View raw
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)____
(__) )\
||--|| *
Back to comp.lang.ruby | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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