re = /(<Reference Include=")(DevExpress\.\D+\.v14\.1)(, Version=14\.1\.10\.0, Culture=neutral, PublicKeyToken=\S+, processorArchitecture=MSIL">)[\r\n\s]*(<SpecificVersion>False<\/SpecificVersion>)[\r\n\s]*(<\/Reference>)/
str = ' <Reference Include="DevExpress.Data.v14.1, Version=14.1.10.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
</Reference>'
# Print the match result
str.match(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