From: Mike Steiner Date: 2007-05-02T11:20:33+09:00 Subject: testing and assigning with regexp's ------=_Part_613_5004743.1178072431016 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I'm new to Ruby, and in a little program I'm writing, I have code like this: str = '' if /something/.match(str) str = /something/.match(str)[1] end Is there a more elegant way to do this? Mike Steiner ------=_Part_613_5004743.1178072431016--