From: "Iñaki Baz Castillo" Date: 2009-07-22T06:37:38+09:00 Subject: Re: Simple problem with Regular Expression El Martes, 21 de Julio de 2009, Max Norman escribió: > > PS: Just valid for 1.9 due to the usage of "fruit[0]". > > Unfortunately I'm not using 1.9, but I would appreciate any explanation > of this syntax as well. Are you referring to the word 'fruit' as an > array, then specifying the first element of that array? 'fruit' is not an array, but a string. However, 'fruit'[0] returns the first character of the string (note that in Ruby a character is also a string). > How would one code this in 1.8? fruit[/^(.)/] -- Iñaki Baz Castillo