Hee-Sob Park wrote:
> 
> How about
> 
> key, val = /^(.+)=(.+)$/.match(var)[1..-1]
> if key
> ...
> 
> Or
> 
> if (key, val = /^(.+)=(.+)$/.match(var)[1..-1])[0]
> ...
> 

These will result in:

NameError: undefined method `[]' for nil

if there is no match...


Guy N. Hurst

-- 
HurstLinks Web Development    http://www.hurstlinks.com/
Norfolk, VA  23510            (757)623-9688 FAX 623-0433
PHP/MySQL - Ruby/Perl - HTML/Javascript