or 

regexp = Regexp.new( "test", Regexp::IGNORECASE )
print "matched" if regexp.match( text )

Ruby tends towards one-two line solutions that are still readable... 

... ok, the rest of this is preaching to the choir, but I figured it
was worth noting.

I don't know how many people caught it when they looked at the
computer language shootout ... but if you slide to the bottom of the
language vs language page it will show you the summed scores for each
language as to how many tests it had won in each category of scoring (
memory usage, cpu time, etc ).  The most interesting statistics that
the shootout provides is the comparisons of lines of code ... ( at
least this is important to me )

To be able to have the expressiveness that Ruby has and be able to get
as much done in as few lines of READABLE code and do that more often
than other programming languages ... that's really cool.  That's how I
sell Ruby to those that ask "Why Ruby?" ... Because I get more done,
faster.

With Python I was ALWAYS digging back through the reference materials
or calling dir( blah ) and doc( blah.crud ) ... just to figure out how
to call things and what to call, things don't always make sense in
Python ...

Ruby was go from day one ... and has been go ever since.

Anyways, 'nuf said. Thanks Matz.

j.

On 8/19/05, James Britt <james_b / neurogami.com> wrote:
> tony summerfelt wrote:
> > James Britt wrote on 8/18/2005 11:33 PM:
> >
> >>(My biased take is that this is something Pythonitas
> >>like to toss out about any language that allows more than one way to do
> >>anything.)
> >
> >
> > imho, this completely alienates newbies from the language.
> >
> > when i first learned perl ten years ago or so i did something like this:
> >
> > $_=$text # do something with $text
> > if ($text eq "test)
> > {
> >    print "matched"
> > }
> >
> > and it worked. nobody called me names. said i was doing it wrong, etc.
> >
> > after i learned more perl that kind of thing changed a few steps and i
> > ended up writing it this way:
> >
> > $_=$text # do something with $text
> > print "matched" if /test/i
> >
> 
> Absolutely.  Over time, one hopes to acquire good taste in coding style
> and temperament, but typically the goal is to get code to run, and run
> right, and then refactor to beauty.
> 
> James
> 
> --
> 
> http://www.ruby-doc.org - The Ruby Documentation Site
> http://www.rubyxml.com  - News, Articles, and Listings for Ruby & XML
> http://www.rubystuff.com - The Ruby Store for Ruby Stuff
> http://www.jamesbritt.com  - Playing with Better Toys
> 
> 


-- 
"So long, and thanks for all the fish"

Jeff Wood