Mark Hubbart <discord / mac.com> writes:

> On Jul 13, 2004, at 9:03 PM, Bill Kelly wrote:
>>
>> [ ... ]
>>
>>   /(?<!^\s+)\s+/  ...uh....
>>
>> ...Maybe there's another way to do it... If anybody knows
>> I'd like to learn...
>
> as of now, this works:
>
> irb(main):001:0> "  spaces  of  doom  ".split(nil)
> => ["spaces", "of", "doom"]
>
> Why shouldn't nil be the only special case? If the $variable is set to
> nil, it uses this kind of split anyway.
>
> And it's no more characters to type than " " ;)
>
> Mark

... and the following has even fewer characters to type:

  irb(main):001:0> "  spaces  of  doom  ".split()
  => ["spaces", "of", "doom"]


-- 
 Lloyd Zusman
 ljz / asfast.com
 God bless you.