#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)[^»][\d{1,}]$"
Local $sString = "login as: LOGIN" & @CRLF & _
"SERVER@00.00.00.000's password:" & @CRLF & _
"Last login: Thu May 23 15:51:49 2019 from 00.00.00.000" & @CRLF & _
"CREER AUTANT DE REPERTOIRES SOUS /NAME/NAME/NAME QU'IL Y A DE" & @CRLF & _
"COMMERCANTS GERES. LE NOM DOIT ETRE LE NO DE COMMERCANT." & @CRLF & _
"CREER ENSUITE SOUS CHACUN D'EUX UN REPERTOIRE NAME/" & @CRLF & _
"<SERVER>ps -fu NAME | grep exe | echo «resultat=»`wc -l`" & @CRLF & _
"«resultat=»14" & @CRLF & _
"<SERVER>" & @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