#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "\$\{\s*(?<path>[a-zA-Z_$]\w*(?:\.[a-zA-Z_$]\w*)*)\s*\}"
Local $sString = "Hello, ${ name } Hello, ${ 0name } Hello, { name }" & @CRLF & _
"Hello, ${ _name_01 } Hello, ${ name$ } Hello, ${ _name_01 }" & @CRLF & _
"Hello, ${ $_name_2 }" & @CRLF & _
"Hello, ${ user.name.first } ${ user.name.last }!" & @CRLF & _
"Hello, ${ type.user.name.first.f1 } { type.user.name.last }!" & @CRLF & _
"Hello, ${ type.0user.name.first.f1 } ${ type.$user.name.last }!" & @CRLF & _
"Hello, ${ type.$user0._name_.first.f1 } ${ type.user$.name.last }!" & @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