#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)[^u]es|ma$|mo|y|[mie]e|wi|ter|au"
Local $sString = "mother" & @CRLF & _
"mom" & @CRLF & _
"ma" & @CRLF & _
"daughter" & @CRLF & _
"sister" & @CRLF & _
"wife" & @CRLF & _
"grandmother" & @CRLF & _
"grandma" & @CRLF & _
"aunt" & @CRLF & _
"niece" & @CRLF & _
"queen" & @CRLF & _
"princess" & @CRLF & _
"empress" & @CRLF & _
"duchess" & @CRLF & _
"marchioness" & @CRLF & _
"countess" & @CRLF & _
"baroness" & @CRLF & _
"baronetess" & @CRLF & _
"lady" & @CRLF & _
"dame" & @CRLF & _
"" & @CRLF & _
"father" & @CRLF & _
"dad" & @CRLF & _
"pa" & @CRLF & _
"son" & @CRLF & _
"brother" & @CRLF & _
"husband" & @CRLF & _
"grandfather" & @CRLF & _
"grandpa" & @CRLF & _
"uncle" & @CRLF & _
"nephew" & @CRLF & _
"king" & @CRLF & _
"prince" & @CRLF & _
"emperor" & @CRLF & _
"duke" & @CRLF & _
"marquess" & @CRLF & _
"earl" & @CRLF & _
"baron" & @CRLF & _
"baronet" & @CRLF & _
"lord" & @CRLF & _
"knight"
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