From: matz@... (Yukihiro Matsumoto) Date: 2002-09-20T10:07:50+09:00 Subject: Re: Thoughts on improving usage of Regexp#match Hi, In message "Re: Thoughts on improving usage of Regexp#match" on 02/09/20, Dossy writes: |a = /x/.match("abc") && $~[1] || "" # a => "" | |b = /(b)/.match("abc") && $~[1] || "" # b => "b" | |c = /b/.match("abc") && $~[1] || "" # c => "" I guess Hal dislikes these for ugly "$". Another solution: regex.match(str) sub1 = Regexp.last_match(1) || "" matz.