#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?mi)(\d+)\s*fps"
Local $sString = " Stream #0:0[0x7d1]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080, 30 fps, 30 tbr, 90k tbn, 60 tbc" & @CRLF & _
" Stream #0:1[0x7d2]: Audio: mp3 ([4][0][0][0] / 0x0004), 0 channels" & @CRLF & _
"" & @CRLF & _
" Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 1k tbn, 60 tbc" & @CRLF & _
" Stream #0:1: Audio: aac (LC), 44100 Hz, stereo, fltp, 128 kb/s" & @CRLF & _
"Output #0, mpegts, to '/dev/null':" & @CRLF & _
"" & @CRLF & _
" Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 30 fps, 30 tbr, 90k tbn, 1k tbc" & @CRLF & _
" Stream #0:1: Audio: aac (LC), 44100 Hz, stereo, fltp, 128 kb/s" & @CRLF & _
"Stream mapping:"
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