#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^(?P<unit_type>LS1376)(?P<spool_symbol>X201)(?P<sep_1>-)(?P<unit_series>1X)(?P<sep_2>/)(?P<pilot_valve>10S)(?P<solenoid_in_ac_or_dc_version>G)(?P<voltage_of_solenoid>12|24|42|96|110|205|220)(?P<manual_override_unit>N9)(?P<electrical_connection>K4)(?P<sep_3>/)(?P<orifice_positon>B)(?P<orifice_diameter>22)(?P<seal_material>V|)(?P<additional_details>)$"
Local $sString = "typecode" & @CRLF & _
"LS1376X201-1X/10SCG220N9K4/B22V" & @CRLF & _
"LS1376X201-1X/10SCG110N9K4/B22V" & @CRLF & _
"LS1376X201-1X/10SCG24N9K4/B22V" & @CRLF & _
"LS1376X201-1X//V" & @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