From: Tim Greer Date: 2009-01-15T03:04:10+09:00 Subject: Re: Regexp in Ruby 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? I assume you meant names = "My name is Jack" so it's a string, rather than an array. -- 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!