#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)\"externalLinks\"[\s\S]+?(?=\"maxPop\")"
Local $sString = ""oge": "GOF"," & @CRLF & _
" "original": {" & @CRLF & _
" "report": true," & @CRLF & _
" "tier": "IA"" & @CRLF & _
" }," & @CRLF & _
" "pertinentNegative": false," & @CRLF & _
" "populationFrequency": {" & @CRLF & _
" "externalLinks": {" & @CRLF & _
" "7-2-A-T": "https://x.d.org/s/7-d-A-T?dataset=s"" & @CRLF & _
" }," & @CRLF & _
" "maxPop": "South Asian"," & @CRLF & _
" "maxPopAC": 1," & @CRLF & _
" "maxPopAN": 30," & @CRLF & _
" "maxPopFreq": 3.276," & @CRLF & _
" "overallPopAC": 1," & @CRLF & _
" "overallPopAN": 23," & @CRLF & _
" "overallPopFreq": 4.22," & @CRLF & _
" "source": "gnomAD"" & @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