#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^((2ª|segunda)|(3ª|terça)|(4ª|quarta)|(5ª|quinta)|(6ª|sexta))(-feira)?$"
Local $sString = "2ª" & @CRLF & _
"3ª" & @CRLF & _
"4ª" & @CRLF & _
"5ª" & @CRLF & _
"6ª" & @CRLF & _
"2ª-feira" & @CRLF & _
"3ª-feira" & @CRLF & _
"4ª-feira" & @CRLF & _
"5ª-feira" & @CRLF & _
"6ª-feira" & @CRLF & _
"segunda" & @CRLF & _
"terça" & @CRLF & _
"quarta" & @CRLF & _
"quinta" & @CRLF & _
"sexta" & @CRLF & _
"segunda-feira" & @CRLF & _
"terça-feira" & @CRLF & _
"quarta-feira" & @CRLF & _
"quinta-feira" & @CRLF & _
"sexta-feira" & @CRLF & _
"" & @CRLF & _
"oitava-feira" & @CRLF & _
"" & @CRLF & _
"segunda-" & @CRLF & _
"2ª2ª-feira" & @CRLF & _
"-feira" & @CRLF & _
"feira" & @CRLF & _
"22ª" & @CRLF & _
"1ª" & @CRLF & _
"7ª" & @CRLF & _
"ª" & @CRLF & _
"aquartado" & @CRLF & _
"sextavado"
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