From: ts Date: 2002-10-27T02:00:55+09:00 Subject: Re: Validating ISBN: Regex question >>>>> "J" == Josef 'Jupp' Schugt writes: J> | match = /(\d[- ]?){9,9}([0-9xX])/.match(@isbn) Well, if you want to use this regexp replace your for i in 1 .. 10 with match[0].split(/[- ]?/).each_with_index do |x, i| # warning `i' will take the values 0 .. 9 end Guy Decoux