re = /^[A-Za-z0-9+\/]{22}==$/m
str = '/*Base64 encoded object GUID*/
z5mytpY3n0uS7WotFo0XPQ==
y1NiJQ4GvkOc6Sza75j61A==
LGRAKG1ns0u0i7HlruqP3Q==
QOrSNu771Eyc8xQ2pS1jFg==
X9wPxWuMukaZZyDBof7znw==
lQk7QUbexkGt8s6xEu0UoA==
lQk7QUbexkGt8s6xEu0UoA==
lQk7QUbexkGt8s6xEu0UoA==
FCE4wll/okm/2Hgp2cdmMg==
qAzTWmiXT0SHg2sh9h2r8g==
ksVRSMPQhEGrcm6giubf1w==
2BB+XUPh/0mdSrk7tcoi9g==
PtsmDdnwwkKMIOpifql3EQ==
10hez6mxQk+PGIwoNvIzWg==
sr9hU+51nUClfMW/rs6Sog==
zqVrydHA/UqX1OH+TZaaNg==
mL5TJlQ2U0euhNgPXRKcyA==
z5mytpY3n0uS7WotFo0XPQ=='
# 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