#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(\d+\s+Timer.*?PHY Status 0x[01]+ - 0x[01].*?tx_p3a_d1en[\s]+0[x\w])+\s+"
Local $sString = "000 Timer 0x00000000_0002a465 - 0x00000000_0021453e us: Gen1 - Gen1, DETECT.QUIET - DETECT.QUIET: Status 0x00000030 - 0x00000030: L2R_reason 0x00000000: PHY Status 0x01010000 - 0x01010000" & @CRLF & _
"" & @CRLF & _
" Lane 00:" & @CRLF & _
"" & @CRLF & _
" pga_gain 3, pga_off1 0, pga_off2 1, ph_ofs_t -44," & @CRLF & _
"" & @CRLF & _
" cdfe_a2 52, cdfe_a3 64, cdfe_a4 118, cdfe_a5 71, cdfe_a6 12, cdfe_a7 124, cdfe_a8 24, cdfe_a9 76, cdfe_a10 49," & @CRLF & _
"" & @CRLF & _
" zobel_a_gain 12, zobel_b_gain 0, zobel_dc_ofs 260, dc_ofs 25, udfe_thr_0 -152, udfe_thr_1 14, median_amp 179," & @CRLF & _
"" & @CRLF & _
" cdru_lock_count 0, eh_workaround_stat 0x0, los_toggle_cnt 0x8000, adapt_time 207872, cdr_lock_toggle_cnt 0x3000, jat_stat 0x804d" & @CRLF & _
"" & @CRLF & _
" fs_obs 0, lf_obs 0, pre_cursor 0, cursor 0, post_cursor 0, usp_tx_preset 0x0, dsp_tx_preset 0x0" & @CRLF & _
"" & @CRLF & _
" tx_p1a_d1en 0x30, tx_p1a_d2en 0xf, tx_p1a_amp_red 0x0, tx_p1b_d1en 0x3f, tx_p1b_d2en 0x0, tx_p1b_amp_red 0x0" & @CRLF & _
"" & @CRLF & _
" tx_p2a_d1en 0x3f, tx_p2a_d2en 0x0, tx_p2a_amp_red 0x0, tx_p2b_d1en 0x3f, tx_p2b_d2en 0x0, tx_p2b_amp_red 0x0 tx_p3a_d1en 0x28" & @CRLF & _
"" & @CRLF & _
" Lane 01:" & @CRLF & _
"" & @CRLF & _
" pga_gain 15, pga_off1 24, pga_off2 6, ph_ofs_t -57," & @CRLF & _
"" & @CRLF & _
" cdfe_a2 -106, cdfe_a3 120, cdfe_a4 -80, cdfe_a5 -31, cdfe_a6 -13, cdfe_a7 127, cdfe_a8 96, cdfe_a9 127, cdfe_a10 4," & @CRLF & _
"" & @CRLF & _
" zobel_a_gain 0, zobel_b_gain 0, zobel_dc_ofs 457, dc_ofs 217, udfe_thr_0 -215, udfe_thr_1 219, median_amp 176," & @CRLF & _
"" & @CRLF & _
" cdru_lock_count 0, eh_workaround_stat 0x0, los_toggle_cnt 0x8000, adapt_time 207872, cdr_lock_toggle_cnt 0x3000, jat_stat 0x804d" & @CRLF & _
"" & @CRLF & _
" fs_obs 0, lf_obs 0, pre_cursor 0, cursor 0, post_cursor 0, usp_tx_preset 0x0, dsp_tx_preset 0x0" & @CRLF & _
"" & @CRLF & _
" tx_p1a_d1en 0x30, tx_p1a_d2en 0xf, tx_p1a_amp_red 0x0, tx_p1b_d1en 0x3f, tx_p1b_d2en 0x0, tx_p1b_amp_red 0x0" & @CRLF & _
"" & @CRLF & _
" tx_p2a_d1en 0x3f, tx_p2a_d2en 0x0, tx_p2a_amp_red 0x0, tx_p2b_d1en 0x3f, tx_p2b_d2en 0x0, tx_p2b_amp_red 0x0 tx_p3a_d1en 0x28" & @CRLF & _
"" & @CRLF & _
""
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYFULLMATCH)
; 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