#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^(?:(?:fix|feat|docs|doc|breaking|revert|chore|perf|test|style|refactor)(?:\([\w\s]+\))?:).*(?:(?:OS[:\-\s]\s*([0-9]+))|((?:ska|SKA)-(?:[0-9]+))).*"
Local $sString = "chore: Mudanças de configuração ou de ska-7777 código que não entra em produção;" & @CRLF & _
"docs(sdsdsds): Mudanças na documentação ska-7777;" & @CRLF & _
"style: Alteração apenas no estilo do código, ska-7777 sem mudança de algoritmo;" & @CRLF & _
"refactor: Refatoração de determinado ska-7777 bloco de código;" & @CRLF & _
"perf: Alterações que impactam o desempenho da aplicação OS 99999;" & @CRLF & _
"test: Mudanças na OS:99999 estrutura ou na forma de testar o projeto." & @CRLF & _
"feat: dksdOS: 99999jskdjksdksdskdjkjk" & @CRLF & _
"fix: dsdsdsdsd OS: 99999"
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