#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?s) SG_ (\w+) : (\d+)\|(\d+)@[01][+-] \(([0-9E\-\+\.]*),([0-9E\-\+\.]*)\) \[[0-9E\-\+\.]*\|[0-9E\-\+\.]*\] "([^"]*)" Vector__XXX"
Local $sString = "VERSION """ & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"NS_ : " & @CRLF & _
" NS_DESC_" & @CRLF & _
" CM_" & @CRLF & _
" BA_DEF_" & @CRLF & _
" BA_" & @CRLF & _
" VAL_" & @CRLF & _
" CAT_DEF_" & @CRLF & _
" CAT_" & @CRLF & _
" FILTER" & @CRLF & _
" BA_DEF_DEF_" & @CRLF & _
" EV_DATA_" & @CRLF & _
" ENVVAR_DATA_" & @CRLF & _
" SGTYPE_" & @CRLF & _
" SGTYPE_VAL_" & @CRLF & _
" BA_DEF_SGTYPE_" & @CRLF & _
" BA_SGTYPE_" & @CRLF & _
" SIG_TYPE_REF_" & @CRLF & _
" VAL_TABLE_" & @CRLF & _
" SIG_GROUP_" & @CRLF & _
" SIG_VALTYPE_" & @CRLF & _
" SIGTYPE_VALTYPE_" & @CRLF & _
" BO_TX_BU_" & @CRLF & _
" BA_DEF_REL_" & @CRLF & _
" BA_REL_" & @CRLF & _
" BA_DEF_DEF_REL_" & @CRLF & _
" BU_SG_REL_" & @CRLF & _
" BU_EV_REL_" & @CRLF & _
" BU_BO_REL_" & @CRLF & _
"" & @CRLF & _
"BS_:" & @CRLF & _
"" & @CRLF & _
"BU_:" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"BO_ 777 VBOX_9: 8 Vector__XXX" & @CRLF & _
" SG_ Longitude_48bit : 7|48@0- (1E-07,0) [0|0] "minutes" Vector__XXX" & @CRLF & _
"" & @CRLF & _
"BO_ 776 VBOX_8: 8 Vector__XXX" & @CRLF & _
" SG_ Latitude_48bit : 7|48@0- (1E-07,0) [0|0] "minutes" Vector__XXX" & @CRLF & _
" SG_ Kalman_filter_status : 56|1@0+ (1,0) [0|1] "" Vector__XXX" & @CRLF & _
"" & @CRLF & _
"BO_ 774 VBOX_6: 8 Vector__XXX" & @CRLF & _
" SG_ Vel_Quality : 7|16@0- (0.01,0) [0|0] "km/h" Vector__XXX" & @CRLF & _
"" & @CRLF & _
"BO_ 773 VBOX_5: 8 Vector__XXX" & @CRLF & _
" SG_ Trig_Vel_Mph : 55|16@0+ (0.0115078,0) [0|754.163673] "Mph" Vector__XXX" & @CRLF & _
" SG_ Trig_Vel_Kmh : 55|16@0+ (0.01852,0) [0|1213.7082] "Km/h" Vector__XXX" & @CRLF & _
" SG_ Trig_time : 39|16@0+ (0.01,0) [0|655.35] "Secs" Vector__XXX" & @CRLF & _
" SG_ Distance : 7|32@0+ (7.8125E-05,0) [0|335544] "Metres" Vector__XXX" & @CRLF & _
"" & @CRLF & _
"BO_ 772 VBOX_4: 8 Vector__XXX" & @CRLF & _
" SG_ Lateral_acceleration : 55|16@0- (0.01,0) [-327.68|327.67] "G" Vector__XXX" & @CRLF & _
" SG_ Longitudinal_acceleration : 39|16@0- (0.01,0) [-327.68|327.67] "G" Vector__XXX" & @CRLF & _
" SG_ Trig_Dist : 7|32@0+ (7.8125E-05,0) [0|335544] "Metres" Vector__XXX" & @CRLF & _
"" & @CRLF & _
"BO_ 771 VBOX_3: 8 Vector__XXX" & @CRLF & _
" SG_ DGPS : 61|1@0+ (1,0) [0|0] "On" Vector__XXX" & @CRLF & _
" SG_ Brake_trigger : 60|1@0+ (1,0) [0|0] "On" Vector__XXX" & @CRLF & _
" SG_ Vertical_Velocity : 31|16@0- (0.01,0) [0|655.36] "m/s" Vector__XXX" & @CRLF & _
" SG_ Altitude_WGS84 : 7|24@0- (0.01,0) [0|42949700] "metres" Vector__XXX" & @CRLF & _
"" & @CRLF & _
"BO_ 770 VBOX_2: 8 Vector__XXX" & @CRLF & _
" SG_ Velocity_Mph : 39|16@0+ (0.0115078,0) [0|754.163673] "Mph" Vector__XXX" & @CRLF & _
" SG_ Heading : 55|16@0+ (0.01,0) [0|359.99] "Degrees" Vector__XXX" & @CRLF & _
" SG_ Velocity_Kmh : 39|16@0+ (0.01852,0) [0|1213.7082] "Km/h" Vector__XXX" & @CRLF & _
" SG_ Longitude : 7|32@0- (1E-05,0) [-21474.83648|21474.83647] "Minutes" Vector__XXX" & @CRLF & _
"" & @CRLF & _
"BO_ 769 VBOX_1: 8 Vector__XXX" & @CRLF & _
" SG_ Latitude : 39|32@0- (1E-05,0) [-21474.83648|21474.83647] "Minutes" Vector__XXX" & @CRLF & _
" SG_ Time_Since_Midnight : 15|24@0+ (0.01,0) [0|0] "Seconds" Vector__XXX" & @CRLF & _
" SG_ Sats : 7|8@0+ (1,0) [0|12] "Sats" Vector__XXX" & @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