#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+[^\}]+\}"
Local $sString = ".visible-desktop {" & @CRLF & _
" display: inherit !important;" & @CRLF & _
"}" & @CRLF & _
"" & @CRLF & _
"#intro .container {" & @CRLF & _
" margin:0 auto;" & @CRLF & _
" display:table;" & @CRLF & _
"}" & @CRLF & _
"" & @CRLF & _
"@media (max-width: 480px) {" & @CRLF & _
" #intro .download-php { margin: 0; }" & @CRLF & _
"}" & @CRLF & _
"" & @CRLF & _
"@media (min-width: 768px) and (max-width: 979px) {" & @CRLF & _
" .hidden-desktop {" & @CRLF & _
" display: inherit !important;" & @CRLF & _
" }" & @CRLF & _
" .visible-desktop {" & @CRLF & _
" display: none !important ;" & @CRLF & _
" }" & @CRLF & _
" .visible-tablet {" & @CRLF & _
" display: inherit !important;" & @CRLF & _
" }" & @CRLF & _
" .hidden-tablet {" & @CRLF & _
" display: none !important;" & @CRLF & _
" }" & @CRLF & _
"" & @CRLF & _
"}" & @CRLF & _
"" & @CRLF & _
"body, input, textarea {" & @CRLF & _
" font-family: "Fira Sans", "Source Sans Pro", Helvetica, Arial, sans-serif;" & @CRLF & _
" font-weight: 400;" & @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