using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"(?=Violating URL: ).*?(?=$)";
string input = @"Site Searched: SomeSite
Keywords: OurCompany, lineman
Found violations: 3
Infringement Letter: N:\Curriculum\Copyright\Infringement\Infringement Letters\Infringement letters\SomeSite\Infringement Copyright Letter SomeSite_06_18_2019_mjf
Response Email located:
N:\Curriculum\Copyright\Infringement\Infringement Letters\Infringement letters\Reponses\06_18_19_RE DMCA Notice of Copyright Infringement
Item Code: T251LM.K1
Submitter: The Real J. Evans
Submitted Date: 8/2/17
URL Title: OurCompany Test 2
Installer/Tech Job Information, Level I – 2nd Ed., Lesson 1
Violating URL: https://www.SomeSite.com/?src_url=https://www.SomeSite.com/#flashcard/view/19827671
Item Code: J221LM.M1
Submitter: The Real J. Evans
Submitted Date: 8/2/17
URL Title: OurCompany Test 3
Job Information 1, Level I – 2017 Ed., Lesson 10
Violating URL: https://www.SomeSite.com/?src_url=https://www.SomeSite.com/#flashcard/view/19827673
Item Code: OA2-1LM
Submitter: The Real J. Evans
Submitted Date: 8/2/17
URL Title: OurCompany Test 2-1
Outside 2nd Year, Level 1, Lesson 2
Violating URL: https://www.SomeSite.com/?src_url=https://www.SomeSite.com/#flashcard/view/19827549
";
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