using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"jquery-?[0-9.]*(.min|.slim|.slim.min)?\.js";
string input = @"https://www.staging2.villageofalamance.com/wp-includes/js/jquery/jquery.min.js
https://www.staging2.villageofalamance.com/wp-includes/js/jquery/jquery.js
https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.js
https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.js
https://code.jquery.com/jquery-3.5.1.min.js
https://code.jquery.com/jquery-3.5.1.js
https://code.jquery.com/jquery-3.5.1.slim.js
https://code.jquery.com/jquery-3.5.1.slim.min.js
https://c0.wp.com/c/5.2.2/wp-includes/js/jquery/jquery.js
## Shouldn't be excluded
https://www.staging2.villageofalamance.com/wp-content/plugins/league-table/public/assets/js/tablesorter/jquery.tablesorter-min.js?ver=2.08
https://www.staging2.villageofalamance.com/wp-content/themes/bridge/js/plugins/jquery.appear.js?ver=5.6
https://www.staging2.villageofalamance.com/wp-content/themes/bridge/js/plugins/jquery.flexslider-min.js?ver=5.6";
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