[Patrick Hurley <phurley / gmail.com>, 2005-03-23 03.39 CET] > Find below a very slightly modified version of my quiz submission [...] > def fix_low_ace_display(arranged_hand) > # remove card deltas (this routine is only used for straights) > arranged_hand.gsub!(/\S(\S\S)\s+/, "\\1 ") > > # Fix "low aces" > arranged_hand.gsub!(/L(\S)/, "A\\1") > > # Remove duplicate aces (this will not work if you have > # multiple decks or wild cards) > arranged_hand.gsub!(/((A\S).*)\2/, "\\1") Why not just delete the low aces (gsub!(/L./, ""))? What am I missing? BTW, I liked how you detected straights using the delta transform. Clever idea (for me at least :). > > # cleanup white space > arranged_hand.gsub!(/\s+/, ' ') > # careful to use gsub as gsub! can return nil here > arranged_hand.gsub(/\s+$/, '') > end