fork download
  1. str = "19097147835"
  2. str.gsub(/\D/, '').match(/\A1\K\d{10}\z/) do |match|
  3. puts match[0].to_i
  4. end
Success #stdin #stdout 0s 6408KB
stdin
Standard input is empty
stdout
9097147835