#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?im)TRN.*FRLPD\s+FRPLY.*\s*FRLPD\/([\w\s]*).*FRPLY\/([\w\s]*)\/"
Local $sString = "1.TORNEAMPLE/ERIC" & @CRLF & _
" 2 HHL RT HK1 LYS IN23NOV OUT26NOV PAST" & @CRLF & _
" 3 TRN 2C 87 6609 AF 31DEC 1 FRPLY FRLPD HK PAST *" & @CRLF & _
" 4 TRN 2C 87 6628 AF 01JAN 4 FRLPD FRPLY HK1 1800 2007" & @CRLF & _
" FRLPD/LYON PART DIEU//FRPLY/PARIS GARE LYON /TGD *" & @CRLF & _
" 5 MIS 1A HK1 PAR 23MAY-ARCHIVAGES" & @CRLF & _
" 6 AP 04.74.07.68.39"
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