#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(in|out|ref) +w:(\d+) h:(\d+) fmt:(\w+) sar:(\d+)\/(\d+)(?: flags:0x[[:xdigit:]]+)?"
Local $sString = "ffmpeg version N-86388-g3db98cad5c Copyright (c) 2000-2017 the FFmpeg developers" & @CRLF & _
" built with Apple LLVM version 8.1.0 (clang-802.0.42)" & @CRLF & _
" configuration: --enable-version3 --enable-gpl --enable-nonfree --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265" & @CRLF & _
" libavutil 55. 63.100 / 55. 63.100" & @CRLF & _
" libavcodec 57. 96.101 / 57. 96.101" & @CRLF & _
" libavformat 57. 72.101 / 57. 72.101" & @CRLF & _
" libavdevice 57. 7.100 / 57. 7.100" & @CRLF & _
" libavfilter 6. 91.100 / 6. 91.100" & @CRLF & _
" libswscale 4. 7.101 / 4. 7.101" & @CRLF & _
" libswresample 2. 8.100 / 2. 8.100" & @CRLF & _
" libpostproc 54. 6.100 / 54. 6.100" & @CRLF & _
"[Parsed_testsrc_0 @ 0x000000000000] size:320x240 rate:25/1 duration:-1.000000 sar:1/1" & @CRLF & _
"[Parsed_testsrc_1 @ 0x000000000000] size:640x360 rate:25/1 duration:-1.000000 sar:1/1" & @CRLF & _
"[Parsed_scale2ref_2 @ 0x000000000000] w:0 h:trunc((print(ow)*in_h+(in_w*7/2))/(in_h*7))*7 flags:'bilinear' interl:0" & @CRLF & _
"Stream mapping:" & @CRLF & _
" scale2ref:default -> Stream #0:0 (rawvideo)" & @CRLF & _
"Press [q] to stop, [?] for help" & @CRLF & _
"[Parsed_testsrc_0 @ 0x000000000000] size:320x240 rate:25/1 duration:-1.000000 sar:1/1" & @CRLF & _
"[Parsed_testsrc_1 @ 0x000000000000] size:640x360 rate:25/1 duration:-1.000000 sar:1/1" & @CRLF & _
"[Parsed_scale2ref_2 @ 0x7fa20d40efa0] w:0 h:trunc((print(ow)*in_h+(in_w*7/2))/(in_h*7))*7 flags:'bilinear' interl:0" & @CRLF & _
"0.000000" & @CRLF & _
"[Parsed_scale2ref_2 @ 0x000000000000] The width was set to 0 which will use the width of the reference input (640) not the main input (320)." & @CRLF & _
"[Parsed_scale2ref_2 @ 0x000000000000] Consider using: main_w" & @CRLF & _
"[Parsed_scale2ref_2 @ 0x000000000000] The height was set to 0 which will use the height of the reference input (360) not the main input (240)." & @CRLF & _
"[Parsed_scale2ref_2 @ 0x000000000000] Consider using: main_h" & @CRLF & _
"[Parsed_scale2ref_2 @ 0x000000000000] in w:320 h:240 fmt:rgb24 sar:1/1" & @CRLF & _
"[Parsed_scale2ref_2 @ 0x000000000000] ref w:640 h:360 fmt:rgb24 sar:1/1" & @CRLF & _
"[Parsed_scale2ref_2 @ 0x000000000000] out w:640 h:360 fmt:rgb24 sar:3/4 flags:0x2" & @CRLF & _
"Output #0, md5, to 'pipe:':" & @CRLF & _
" Stream #0:0: Video: rawvideo, 1 reference frame (RGB[24] / 0x18424752), rgb24, 640x360 [SAR 3:4 DAR 4:3], q=2-31, 138240 kb/s, 25 fps, 25 tbn, 25 tbc (default)" & @CRLF & _
" Metadata:" & @CRLF & _
" encoder : Lavc rawvideo" & @CRLF & _
"No more output streams to write to, finishing." & @CRLF & _
"MD5=cf8c2055d282268025d43c621e468a83" & @CRLF & _
"frame= 5 fps=0.0 q=-0.0 Lsize= 0kB time=00:00:00.20 bitrate= 1.5kbits/s speed=7.37x " & @CRLF & _
"video:3375kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown" & @CRLF & _
"Output file #0 (pipe:):" & @CRLF & _
" Output stream #0:0 (video): 5 frames encoded; 5 packets muxed (3456000 bytes); " & @CRLF & _
" Total: 5 packets (3456000 bytes) muxed" & @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