Tim Greer
1/14/2009 6:04:00 PM
Tim Mcd wrote:
> Teme Rosi wrote:
>> names = ["My name is Jack"]
>> if names =~ /My name is (\w+)/i
>> puts $1
>> end
>>
>>
>> What im trying to do with this code is to print rest of the line of
>> the same line where "My name is" is. But it doesnt work. Can anyone
>> help?
>
> Hmm, that works for me. I don't know what the /i is for tho. If you
> need to tset out regexp's try www.rubular.com
/i means case insensitive matching.
--
Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
and Custom Hosting. 24/7 support, 30 day guarantee, secure servers.
Industry's most experienced staff! -- Web Hosting With Muscle!