From: Dan Doel Date: 2003-08-21T03:37:20+09:00 Subject: Re: What attracts me to Ruby For example: re = /(.)(.)((.).)/ match = re.match "abcd" if match p match[0] p match[1] p match[2] p match[3] p match[4] end Matt Lawrence wrote: >I've often wondered if there was a good alternative to using $1, $2, $3, >etc. to pull stuff out of a string that has been matched with a regular >expression. Ideas? > >-- Matt > >