using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @/
^[A-Za-z0-9+\/]{22}==$
/;
string input = @"/*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==";
RegexOptions options = RegexOptions.Multiline;
foreach (Match m in Regex.Matches(input, pattern, options))
{
Console.WriteLine("'{0}' found at index {1}.", m.Value, m.Index);
}
}
}
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 C#, please visit: https://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex(v=vs.110).aspx