re = /onclick=\"\w+\(\'[\d_\w]+1\', ?\'([\d\.]+)\', ?\'([\d\.]+)\'\)\"/mi
str = '<div class="shop_descr">
<div class="shop_city">Минск</div>
<div class="shop_name">Магазин "Дом натуральной косметики"</div>
<a href="#top" title="показать на карте" class="shop_addr spec_decor"
onclick="MapWork(\'gm_1\', \'53.964127393\', \'27.6241564751\')">
<i class="glyphicon glyphicon-map-marker"></i>
<span class="dotted">ТЦ Expobel, пересечение ул. Мирошниченко и МКАД</span></a>
<div class="shop_phone">
<a href="tel:+375172379448"
class="phone_link">+375 (17) 237-94-48</a><br/>
</div>
</div>'
# 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