From: "Hal E. Fulton" Date: 2002-09-20T10:18:46+09:00 Subject: Re: Thoughts on improving usage of Regexp#match ----- Original Message ----- From: "Yukihiro Matsumoto" To: "ruby-talk ML" Sent: Thursday, September 19, 2002 8:02 PM Subject: Re: Thoughts on improving usage of Regexp#match > |So I tried writing: > | > | sub1 = regex.match(str)[1] || "" > > How about > > sub1 = (regex.match(str)[1] rescue "") > > if you're using 1.7.x? I like that very much. I don't usually use 1.7.x, though, except with FreeRIDE. Hal