#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^[^{}]+{"
Local $sString = ".match_num {" & @CRLF & _
" font-family: futura, helvetica, arial;" & @CRLF & _
" font-variant: small-caps;" & @CRLF & _
" color: #84BDE7;" & @CRLF & _
" color: #0066B3;" & @CRLF & _
" font-size: 12px;" & @CRLF & _
" font-weight: normal;" & @CRLF & _
" display: inline-block;" & @CRLF & _
"}" & @CRLF & _
"" & @CRLF & _
".match0,.match1,.match2,.match3,.match4,.match5,.match6,.match7,.match8,.match9,.match10,.match11 {" & @CRLF & _
" white-space: pre-wrap;" & @CRLF & _
" font-size: 12px;" & @CRLF & _
" padding: 1px 2px;" & @CRLF & _
"}" & @CRLF & _
"" & @CRLF & _
".backref_hover {" & @CRLF & _
" cursor: help;" & @CRLF & _
"}" & @CRLF & _
"" & @CRLF & _
"input {" & @CRLF & _
" blah: blah;" & @CRLF & _
"}" & @CRLF & _
"" & @CRLF & _
".stuff {" & @CRLF & _
"problem: here;" & @CRLF & _
"}" & @CRLF & _
"" & @CRLF & _
".hello" & @CRLF & _
"" & @CRLF & _
"{" & @CRLF & _
"" & @CRLF & _
"whatever" & @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