#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?ix)\b(?:[ptkmnlswj]?" & @CRLF & _
"(?:(?<=w)[aei]|" & @CRLF & _
"(?<=[jt])[aeou]|" & @CRLF & _
"(?<=[pkmnls])[aeiou]|" & @CRLF & _
"(?<=\b)[aeiou])" & @CRLF & _
"(?:n(?![nm]?[aeiou]))?)+\b"
Local $sString = "panna" & @CRLF & _
"jijin" & @CRLF & _
"titin" & @CRLF & _
"wowu" & @CRLF & _
"wonwun" & @CRLF & _
"tewun" & @CRLF & _
"tetin" & @CRLF & _
"tejin" & @CRLF & _
"teji" & @CRLF & _
"aan" & @CRLF & _
"---" & @CRLF & _
"mama" & @CRLF & _
"seme" & @CRLF & _
"pona" & @CRLF & _
"toki pona li toki suwi" & @CRLF & _
"jan Lili li lili" & @CRLF & _
"" & @CRLF & _
"ni li ilo Lekula Epesen. ni li ken lanpan e nimi mute " & @CRLF & _
"eni" & @CRLF & _
"" & @CRLF & _
"nanma" & @CRLF & _
"" & @CRLF & _
""
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