#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^[LNSE] .*(?:\n(?![LNSE] ).*)?"
Local $sString = "L 065 00 24329 12313 244.0.15.55 252.9.11.90 02/25 08:05 00:00:44 0000 0000 " & @CRLF & _
" " & @CRLF & _
"N 066 00 23442 T000185 262.1.00.09 02/25 08:05 00:00:02 A 16630" & @CRLF & _
"& 0000 0000 " & @CRLF & _
"S 067 00 00984 T000134 02/25 08:06 00:00:02 A 61445" & @CRLF & _
"& 0000 0000 " & @CRLF & _
"S 068 00 T000002 29536 02/25 08:05 00:00:36 " & @CRLF & _
"& 0000 0000 1234567890XXXXXX " & @CRLF & _
"E 069 00 T000002 T000185 02/25 08:06 00:00:00 " & @CRLF & _
"& 0000 0000 1234567890XXXXXX" & @CRLF & _
"L 065 00 24329 12313 244.0.15.55 252.9.11.90 02/25 08:05 00:00:44 0000 0000 "
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