re = /<\s*span[^>]*>(.*?)<\s*\/\s*span\s*>/m
str = '<p nameIt="Title">Title_Test</p><figure class="t15"><table><thead><tr>
<th><span>Column1</span></th><th><span>Column2</span></th></tr></thead><tbody><tr><td><span>Entry1</span></td><td><span>Entry2</span></td><td><span>ready</span></td></tr><tr><td><span style="some:style;">Entry3</span></td><td><span style="another:style;">Entry4</span></td></tr></tbody></table></figure><p ex="ready">!aaa; '
# 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