using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"^\/(storage\/archive\/[0-9a-f-]{36}.*)";
string input = @"/storage/archive/ab7572d3-c697-4cfa-9b23-71b6f9c388d1
/public/storage/archive/ab7572d3-c697-4cfa-9b23-71b6f9c388d1
/storage/archive/not-hexadecimal-123456789abcdef01234";
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