[#1816] Ruby 1.5.3 under Tru64 (Alpha)? — Clemens Hintze <clemens.hintze@...>

Hi all,

17 messages 2000/03/14

[#1989] English Ruby/Gtk Tutorial? — schneik@...

18 messages 2000/03/17

[#2241] setter() for local variables — ts <decoux@...>

18 messages 2000/03/29

[ruby-talk:02257] Re: Multiple assignment of pattern match results.

From: mrilu <mrilu@...>
Date: 2000-03-30 08:04:20 UTC
List: ruby-talk #2257
On Thu, 30 Mar 2000 schneik@us.ibm.com wrote:

> The only problem I have with this example is that scan is going through the
> work of producing an array of arrays, even though I only want the first
> match:
> 
> irb(main):003:0> (t, u, v) = x.scan(/(a+)[^ace]*(c+)[^e]*(e+)/)
> [["aa", "cccc", "eeee"], ["a", "c", "e"], ["a", "c", "e"], ["a", "c", "e"]]

I think it's time for String.scan(pattern[, limit]), like split.

In This Thread