#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)details:.*?(\/src\/.*?\.png\b)"
Local $sString = "'\u001b[1m\u001b[31m \u001b[1m● \u001b[1mregister page › register-automated › desktop › CONTROL\u001b[39m\u001b[22m\n\n Expected image to match or be a close match to snapshot but was 0.009980258828690502% different from snapshot (91 differing pixels).\n \u001b[1m\u001b[31mSee diff for details:\u001b[39m\u001b[22m \u001b[31m/src/pages/__image_snapshots__/__diff_output__/register-test-js-register-page-register-automated-desktop-control-1-diff.png\u001b[39m\n\u001b[2m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m 60 | \u001b[39m\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m 61 | \u001b[39m \u001b[36mconst\u001b[39m image \u001b[33m=\u001b[39m await page\u001b[33m.\u001b[39mscreenshot({ fullPage\u001b[33m:\u001b[39m isFullPage })\u001b[33m;\u001b[39m\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m\u001b[31m\u001b[1m>\u001b[2m\u001b[39m\u001b[90m 62 | \u001b[39m expect(image)\u001b[33m.\u001b[39mtoMatchImageSnapshot({threshold\u001b[33m:\u001b[39m \u001b[35m0.3\u001b[39m})\u001b[33m;\u001b[39m\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m | \u001b[39m \u001b[31m\u001b[1m^\u001b[2m\u001b[39m\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m 63 | \u001b[39m })\u001b[33m;\u001b[39m\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m 64 | \u001b[39m\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m 65 | \u001b[39m \u001b[36mif\u001b[39m(experimentName \u001b[33m||\u001b[39m experiementVariationName) {\u001b[0m\u001b[22m\n\u001b[2m\u001b[22m\n\u001b[2m \u001b[2mat Object.toMatchImageSnapshot (\u001b[2msrc/command/getPageImageShot.js\u001b[2m:62:25)\u001b[2m\u001b[22m\n'" & @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