From: Gavin Sinclair Date: 2002-12-06T11:06:19+09:00 Subject: Re: Regexp imxo - does 'x' work? From: "Ted" > > > perl -e 'print "foobar" =~ /foo bar/x' >> 1 > > > ruby -e 'print "foobar" =~ /foo bar/x' >> 0 > > > > Perl is returning whether there was a match (undef if no match). > > Ruby is returning the offset of the match (strings start at 0). > > .. and it returns 'nil' for no match? Try 'irb' and/or 'ri'. Gavin