re = /((?:[^\x00-\x7F]|[a-zA-Z]\s*)+)(\d+\/\d{2})/
str = 'Ericsson Sistemas de Energia Ltda 1029384756/00
Ericsson Telecomunicações 0192837465/00
Telefônica do Brasil Ltda 5647382910/00
Tim do Brasil Ltda 3669278723/00
Telemar Telecomunicações Ltda 5463782113/00
Vivo do Brasil Ltda 7588697132/00
Oi Telecomunicações Ltda 1253467264/00
Claro do Brasil Ltda 0980966535/00
Telecomunicações Ltda 3562989272/00'
# Print the match result
str.scan(re) do |match|
puts match.to_s
end
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Ruby, please visit: http://ruby-doc.org/core-2.2.0/Regexp.html