re = /("name":"[^"]+")|("price":(?:\d{1,3}.?)+[.,]\d{1,2})/
str = '[{"productsShelf":[],"productsDetail":[{"position":"1","name":"Placa-M�e ASUS p/ Intel LGA 1151 ATX ROG STRIX Z270E GAMING,DDR4,Aura Sync, �udio Gamer, Rede Intel, SLI/CFX, Wi-Fi, USB 3.1 Frontal,HDMI/DP","category":"Hardware/Placas-m�e/P/ Processador Intel/ASUS","brand":"Asus;","price":1095.9,"id":"84264","available":true}],"visitor":"","pageType":"product","breadcrumb":[{"url":"http://www.kabum.com.br/hardware","name":"Hardware"},{"url":"http://www.kabum.com.br/hardware/placas-mae","name":"Placas-m�e"},{"url":"http://www.kabum.com.br/hardware/placas-mae/p-processador-intel","name":"P/ Processador Intel"},{"url":"http://www.kabum.com.br/hardware/placas-mae/p-processador-intel/asus","name":"ASUS"}]}];'
# 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