From: Thomas Leitner Date: 2004-12-20T19:32:08+09:00 Subject: Re: [SOLUTION] Scrabble Stems (#12) On Mon, 20 Dec 2004 17:20:07 +0900 Giovanni Intini wrote: | On Mon, 20 Dec 2004 10:36:18 +0900, James Edward Gray II | wrote: | > Here's my solution. It doesn't really have any clever | > optimizations, but it runs in seconds. | | > line.tr!("^a-zA-Z", "") | | Can you explain this line? | | Deletes every character which is not in the ranges a-z and A-Z in the string variable line. Ie. irb(main):001:0> line = "abZdF.A4d" => "abZdF.A4d" irb(main):002:0> line.tr!("^a-zA-Z", "") => "abZdFAd" irb(main):003:0> -- |\ Thomas Leitner -- thomas [underscore] leitner [at] gmx [dot] at |> |/ "Life is what happens to you while you're busy making other plans"