re = /data-v-[^\s"]+="[^"]*"/m
str = '<div data-v-41dfcbba="" class="aaaaaa" style="width: 100%; height: 100%;"><div data-v-fc1d9bbe="" data-v-41dfcbba="" style="height: 100%;"><div data-v-0392e45a="" data-v-fc1d9bbe="" class="modal upgrade-plan-modal">'
# 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