#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?msi)(?:EXPERIENCE|Employment experience)\s*\n(.*?)\n(?:Skills|Education)"
Local $sString = "xyz " & @CRLF & _
"66 Chetwynd Road " & @CRLF & _
"UK " & @CRLF & _
" " & @CRLF & _
"Phone - 070040040040 " & @CRLF & _
"Email - a18@hotmail.co.uk " & @CRLF & _
"PERSONAL PROFILE " & @CRLF & _
"I am an energetic, hardworking individual who has developed a responsible approach to any " & @CRLF & _
"task I undertake or problem I’m presented with. With previous experience in both customer " & @CRLF & _
"service and administration, I can skillfully work with others and help with situations I am " & @CRLF & _
"faced with in a calm collective manner. " & @CRLF & _
"EXPERIENCE " & @CRLF & _
"Play Centre " & @CRLF & _
"HOST (September 2021- Present) " & @CRLF & _
"▪ Working well under pressure, making decisions quickly and strategically " & @CRLF & _
"▪ Problem -solving and using initiative " & @CRLF & _
" " & @CRLF & _
"xyz center " & @CRLF & _
"Sales Assistant (November 2020 -January 2020) " & @CRLF & _
"▪ Interacted with customers ensuring service was welcoming and helpful. " & @CRLF & _
"▪ Responded to any queries " & @CRLF & _
" " & @CRLF & _
" " & @CRLF & _
"Health & Wellness Club - Work Experience " & @CRLF & _
"Staff - (January 2020 - February 2020) " & @CRLF & _
"▪ Welcomed members into the gym " & @CRLF & _
"▪ Ensured all equipment was safe and clean before it was used by members " & @CRLF & _
" " & @CRLF & _
"EDUCATION " & @CRLF & _
"September 2021 -2022 " & @CRLF & _
"University College "
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYGLOBALFULLMATCH)
Local $aFullArray[0]
For $i = 0 To UBound($aArray) -1
_ArrayConcatenate($aFullArray, $aArray[$i])
Next
$aArray = $aFullArray
; Present the entire match result
_ArrayDisplay($aArray, "Result")
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 AutoIt, please visit: https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm