using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"(?:EXPERIENCE|Employment experience)\s*\n(.*?)\n(?:Skills|Education)";
string input = @"xyz
66 Chetwynd Road
UK
Phone - 070040040040
Email - a18@hotmail.co.uk
PERSONAL PROFILE
I am an energetic, hardworking individual who has developed a responsible approach to any
task I undertake or problem I’m presented with. With previous experience in both customer
service and administration, I can skillfully work with others and help with situations I am
faced with in a calm collective manner.
EXPERIENCE
Play Centre
HOST (September 2021- Present)
▪ Working well under pressure, making decisions quickly and strategically
▪ Problem -solving and using initiative
xyz center
Sales Assistant (November 2020 -January 2020)
▪ Interacted with customers ensuring service was welcoming and helpful.
▪ Responded to any queries
Health & Wellness Club - Work Experience
Staff - (January 2020 - February 2020)
▪ Welcomed members into the gym
▪ Ensured all equipment was safe and clean before it was used by members
EDUCATION
September 2021 -2022
University College ";
RegexOptions options = RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.IgnoreCase;
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