From: David Alan Black Date: 2002-07-23T20:24:42+09:00 Subject: Re: Strings and member-operators Hi -- On Tue, 23 Jul 2002, Dossy wrote: > On 2002.07.23, David Alan Black wrote: > > class String > > def stripQuotes > > /^("?)(.*?)(\1)$/.match(self)[2].strip > > end > > end > > Very cool. I wonder why you had to wrap \1 in parens, though. > Just for visual symmetry, or did it only work that way? Good question. I think it was left over from some intermediate version that used the grouping for something. It can definitely go. David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav