re = /^ActiveCampaign\/email/m
str = 'activecampaign/email/dp philippines newsletter 10apr2019
ActiveCampaign/email/The Cube Pattaya TH-EN ALL 22AUG19/Luxury Condo Development in Pattaya, Thailand
ActiveCampaign/email/Samui Beachfront Villas TH-EN Group TH-EN MAY19 (Tide Samui)/Beachfront Villas in Koh Samui with Private Pool'
# 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