Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.ruby > #6866
| From | Robert Klemme <shortcutter@googlemail.com> |
|---|---|
| Newsgroups | comp.lang.ruby |
| Subject | Re: unterminated string meets end of file |
| Date | 2013-08-12 21:15 +0200 |
| Message-ID | <b6sqj2Fh2goU1@mid.individual.net> (permalink) |
| References | <82f9d89b-33da-48cc-adc8-1a6776f29050@googlegroups.com> <d651cbfc-f251-4dea-a676-cbf0f6ac01a5@googlegroups.com> <e4584c14-244d-4dd1-9162-870902ff41c6@googlegroups.com> <400f418c-42f0-474e-a5c1-d230136115a9@googlegroups.com> <87bo589dz3.fsf@xts.gnuu.de> |
On 08.08.2013 21:31, Simon Krahnke wrote: > * Andi Altendorfer <iboard.cc@gmail.com> (13:07) schrieb: > >> puts 'some." string'.gsub(/(\s+)?\.\"/, ' ').gsub(/\ +/,' ') > > What are parentheses for? And the question mark? /\s*\.\"/? And why escape a double quote in a regexp? And what about following spaces? irb(main):002:0> 'some." string'.gsub(/\s*\."\s*/, ' ') => "some string" Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/
Back to comp.lang.ruby | Previous | Next — Previous in thread | Find similar
unterminated string meets end of file div n <divya.n25@gmail.com> - 2013-08-07 04:46 -0700
Re: unterminated string meets end of file Andi Altendorfer <iboard.cc@gmail.com> - 2013-08-07 06:13 -0700
Re: unterminated string meets end of file div n <divya.n25@gmail.com> - 2013-08-08 02:23 -0700
Re: unterminated string meets end of file Andi Altendorfer <iboard.cc@gmail.com> - 2013-08-08 04:07 -0700
Re: unterminated string meets end of file Simon Krahnke <overlord@gmx.li> - 2013-08-08 21:31 +0200
Re: unterminated string meets end of file Robert Klemme <shortcutter@googlemail.com> - 2013-08-12 21:15 +0200
csiph-web