#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)da\s+Secretaria\s+de\s+Estado\s+de\s+Planejamento\s+e\s+Gestão"
Local $sString = "NOMEAR ISABELLE FERREIRA ZARONI, ID FUNCIONAL Nº" & @CRLF & _
"5100796-7, para exercer, com validade a contar de 16 de novembro" & @CRLF & _
"de 2020, o cargo em comissão de Assessor, símbolo DAS-7, da Sub-" & @CRLF & _
"secretaria de Concessões e Parcerias, da Secretaria de Estado de" & @CRLF & _
"Planejamento e Gestão, anteriormente ocupado por Vinicius dos San-" & @CRLF & _
"tos Silva, ID Funcional n° 5108029-0. Processo nº SEI-" & @CRLF & _
"1 2 0 0 0 1 / 0 1 4 6 11 / 2 0 2 0 ."
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