From: Julian Snitow Date: 2003-04-17T07:56:14+09:00 Subject: Re: regular expressions Chris Pine wrote: > Oops. > > ----- Original Message ----- > From: "Chris Pine" > > # /a*b/ > 'a'*(0..) + 'b' > ---------------------------- > > I didn't realize you can't do one-sided ranges in Ruby. (I never seem to > use ranges for some reason.) [snip] > > Too bad about `0..', though... > > One thing at a time, > > :) > > Chris > > I'm not sure how regexes handle these things internally (and, yes, it *would* be nice to have one-sided ranges natively), but for things like case equality I've found it pretty easy to make quick-and-dirty classes like GreaterThan [e.g. when GreaterThan.new(6)]. Of course, I abandoned this approach for something less ugly... ;-) Julian