def number_match?(number, regex)
      match = number.match(cr("^(?:#{regex})$"))
      match && match.to_s.length == number.length
    end
def number_match?(number, regex)
      match = number.match(cr("^(?:#{regex})$"))
      match && match.to_s.length == number.length
    end
Checks number against regex and compares match length

 ==== Attributes

 * +number+ - phone number for validation
 * +regex+ - regex for perfoming a validation