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


Groups > comp.lang.ruby > #6862

Re: unterminated string meets end of file

From Simon Krahnke <overlord@gmx.li>
Newsgroups comp.lang.ruby
Subject Re: unterminated string meets end of file
Date 2013-08-08 21:31 +0200
Organization there's no z in organisation
Message-ID <87bo589dz3.fsf@xts.gnuu.de> (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>

Show all headers | View raw


* Andi Altendorfer <iboard.cc@gmail.com> (13:07) schrieb:

> puts 'some." string'.gsub(/(\s+)?\.\"/, ' ').gsub(/\ +/,' ')

What are parentheses for? And the question mark? /\s*\.\"/?

> # => some string
>
> The first gsub replaces any number of spaces followed by ." with a single space.
> The second gsub replaces multiple spaces by a single space.

mfg,                           simon .... l

Back to comp.lang.ruby | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

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