#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)\(*(\w{3})[-_~\s*\.]*?(\d{1,}|\d*.\d*.\d*)[-_\s.~]*?(FTP|IMG|SCR|LIV|TVU).?-?\s?(\w{3}).\s?-?_?~?\.?(\d*).\s?-?~?_?\.?(.*)"
Local $sString = "((NWS_20-12-19_FTP_VLR_01_This is a test message))" & @CRLF & _
"(NWS 11219 LIV TNL 02 Second test message)" & @CRLF & _
"(((NWS~11/12/2019~IMG-KNK-4-third_test_message)))" & @CRLF & _
"(NWS-12-12-19-SCR-TVM-03-Fourth-test-message))" & @CRLF & _
"((NWS - 12.12.2019 - FTP - CGP -5 - fifth test message)" & @CRLF & _
"(NWS_12.12/19~FTP-CHN 01_sixth test message "
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