Hi,

I'm having some strange result from the .scan method used on a string.

Here's my code :

a = "counter-46382764"
r = /counter-(\d+)/

puts (a.scan(r)).inspect

It prints : [ [ "46382764" ] ]

I was expecting : [ "46382764" ]
(just a simple array not an array in an array)

What's wrong with me ? :/

Thanks a lot !

pollop.

-- 
Posted via http://www.ruby-forum.com/.