#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?im)(head|director|vp|vice[- ]president|chief)\s*(of\s*)?(growth|marketing)|cmo|chief marketing officer|C(ief )?R(evenue )?O(fficer)?\b"
Local $sString = " "Revenue Ops Manager"," & @CRLF & _
" "Growth Marketing Manager"," & @CRLF & _
" "CEO"," & @CRLF & _
" "Director of Operations"," & @CRLF & _
" "Sales Ops Analyst"," & @CRLF & _
" "VP of Sales"," & @CRLF & _
" "Marketing Operations Specialist"," & @CRLF & _
" "Lead Generation Manager"," & @CRLF & _
" "Product Ops Director"," & @CRLF & _
" "GTM Strategy Lead"," & @CRLF & _
" "Head of Growth"," & @CRLF & _
" "Chief Marketing Officer"," & @CRLF & _
" "Director of Business Development"," & @CRLF & _
" "Junior Revenue Analyst"," & @CRLF & _
" "Freelance Growth Consultant"," & @CRLF & _
" "CTO and Product Owner"," & @CRLF & _
" "Sales Development Representative"," & @CRLF & _
" "Intern Marketing Operations"," & @CRLF & _
" "Business Systems Administrator"," & @CRLF & _
" "Country Manager and COO"," & @CRLF & _
" "Chief Growth Officer"," & @CRLF & _
" "VP Marketing and Communications"," & @CRLF & _
" "Head of Business Opportunities"," & @CRLF & _
" "Revenue Operations Specialist"," & @CRLF & _
" "Product Marketing Manager"" & @CRLF & _
"Revenue Ops" & @CRLF & _
"RevOps" & @CRLF & _
"Chief Revenue Officer" & @CRLF & _
"CRO" & @CRLF & _
"CMO"
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