use strict;
my $str = '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 ';
my $regex = qr/(?:EXPERIENCE|Employment experience)\s*\n(.*?)\n(?:Skills|Education)/msip;
if ( $str =~ /$regex/g ) {
print "Whole match is ${^MATCH} and its start/end positions can be obtained via \$-[0] and \$+[0]\n";
# print "Capture Group 1 is $1 and its start/end positions can be obtained via \$-[1] and \$+[1]\n";
# print "Capture Group 2 is $2 ... and so on\n";
}
# ${^POSTMATCH} and ${^PREMATCH} are also available with the use of '/p'
# Named capture groups can be called via $+{name}
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 Perl, please visit: http://perldoc.perl.org/perlre.html