From: Jesper Brandt Date: 2011-08-13T03:31:12+09:00 Subject: noob question - pattern matching I have a list of 22000 8 digit numbers. Im looking for a number which is the "best" from a defined set of patterns. a pattern could be "abababab" givng a score of 10, and another would be "abab" giving a score of 5. Patterns could also be specific digits, so another pattern defining "a0b0" - giving 7 points would mean that it would only match if there is zeroes in the number such as 10203040 (with all the above rules it would give 21 points). This way the number 52525252 would give a score of 25 and the number 52526262 would give the score of 10. do anybody have a good idea on how to make such a scoring in ruby? I'm sorry - but im a bit of a noob regarding ruby, but thought it would be a good project to get a better virew on the language:-) Regards JB -- Posted via http://www.ruby-forum.com/.