#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^Encryption Algorithms:(\w+-\w+(?:,\w+-\w+)*)"
Local $sString = "SSH Enabled - version 2.0" & @CRLF & _
"Authentication methods:publickey,keyboard-interactive,password" & @CRLF & _
"Encryption Algorithms:aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc" & @CRLF & _
"MAC Algorithms:hmac-sha1,hmac-sha1-96" & @CRLF & _
"Authentication timeout: 120 secs; Authentication retries: 3" & @CRLF & _
"Minimum expected Diffie Hellman key size : 1024 bits" & @CRLF & _
"IOS Keys in SECSH format(ssh-rsa, base64 encoded):"
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