#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "\d{2}\w-\d{5}_(?P<code>DC\d{1,3})_(?P<well_adress>\w\d{2})_(?P<id>\d*)_(?P<plate>P[1-3])_(?P<wdh>W_)*UV-metric (?P<solvent>psKa|pKa).t3r"
Local $sString = "20F-22003_DC8_D03_1032246_P1_UV-metric psKa.t3r" & @CRLF & _
"20F-29001_DC8_D03_1032246_P1_W_UV-metric psKa.t3r" & @CRLF & _
"20F-26012_DC29_F21_1088043_P1_UV-metric psKa.t3r" & @CRLF & _
"20G-03010_DC60_L03_1366347_P1_UV-metric pKa.t3r" & @CRLF & _
"20G-04001_DC28_F19_1087258_P1_W_UV-metric psKa.t3r" & @CRLF & _
"21I-27003_DC245_D13_7018930044_P1_UV-metric psKa.t3r" & @CRLF & _
"20H-26004_DC124_J03_1216895_P2_UV-metric pKa.t3r" & @CRLF & _
"20I-03024_DC168_L12_105750012_P2_UV-metric psKa.t3r" & @CRLF & _
"20J-05001_DC132_K06_1298433_P2_W_UV-metric psKa.t3r" & @CRLF & _
"21I-14006_DC218_F07_1056516_P3_UV-metric psKa.t3r" & @CRLF & _
"test.txt"
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