#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(?:\"|\')(?<key>[\w\d]+)(?:\"|\')(?:\:\s*)(?:\"|\')?(?<value>[\w\s-]*)(?:\"|\')?"
Local $sString = "{" & @CRLF & _
" "Users": {" & @CRLF & _
" "RCYzpiJLRkcUfaPi7Pxu1OxGFTi2": {" & @CRLF & _
" "Active": "ON"," & @CRLF & _
" "Country": "country1"," & @CRLF & _
" "Email": "email1"," & @CRLF & _
" "ID": "RCYzpiJLRkcUfaPi7Pxu1OxGFTi2"," & @CRLF & _
" "Img": "imglink1"," & @CRLF & _
" "UserName": "username1"," & @CRLF & _
" "videos491375": "videolink1"," & @CRLF & _
" "videos748628": "videolink2"" & @CRLF & _
" }," & @CRLF & _
" "ZqOOX8nUSuVYI9YY9jkub22kWTP2": {" & @CRLF & _
" "Active": "ON"," & @CRLF & _
" "Country": "country2"," & @CRLF & _
" "Email": "username2"," & @CRLF & _
" "ID": "ZqOOX8nUSuVYI9YY9jkub22kWTP2"," & @CRLF & _
" "Img": "imglink1"," & @CRLF & _
" "UserName": "username2"," & @CRLF & _
" "videos1096589": "videolink1"," & @CRLF & _
" "videos12385": "videolink2"," & @CRLF & _
" "videos552833": "videolink3"" & @CRLF & _
" }," & @CRLF & _
" "ZqOOX8nUSuVYI9YY9jkub22kWTP2": {" & @CRLF & _
" "Active": "ON"," & @CRLF & _
" "Country": "country3"," & @CRLF & _
" "Email": "email3"," & @CRLF & _
" "ID": "ZqOOX8nUSuVYI9YY9jkub22kWTP2"," & @CRLF & _
" "Img": "imglink"," & @CRLF & _
" "UserName": "username3"," & @CRLF & _
" }," & @CRLF & _
" "mJozWrOKLqgdUPpZhZfinIxiKy92": {" & @CRLF & _
" "Active": "ON"," & @CRLF & _
" "Country": "country4"," & @CRLF & _
" "Email": "emailuser"," & @CRLF & _
" "ID": "mJozWrOKLqgdUPpZhZfinIxiKy92"," & @CRLF & _
" "Img": "imglink"," & @CRLF & _
" "UserName": "username4"," & @CRLF & _
" "videos361534": "videolink1"" & @CRLF & _
" }" & @CRLF & _
" }" & @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