re = /^(Name=")(Show_Type"|Licensing_Window_End"|Display_As_New")(\s+Value="[A-Za-z0-9-:\s]+")([\/>\s]+)(.*)$/m
str = 'App_Data App="MOD" Name="Genre" Value="Series"/><App_Data App="MOD"
Name="Show_Type" Value="Series"/><App_Data App="MOD" Name="Billing_ID"
Value="10092"/><App_Data App="MOD" Name="Licensing_Window_Start"
Value="2019-05-07 00:00:00"/><App_Data App="MOD"
Name="Licensing_Window_End" Value="2019-05-13 23:59:59"/><App_Data
App="MOD" Name="Preview_Period" Value="0"/><App_Data App="MOD"
Name="Display_As_New" Value="4"/><App_Data App="MOD"
Name="Display_As_Last_Chance" Value="7"/><App_Data App="MOD"
Name="Provider_QA_Contact" Value="NBC Universal"/><App_Data App="MOD"
Name="Suggested_Price" Value="0.00"/><App_Data App="MOD" '
# 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