#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?i)\/\*\*[\s\S]*?@config\s*(\{[\s\S]*?\})[\s\S]*?\*\/\s*[\#\.]?([\w-]+)\s*(?:[\#\.]*([\w-]+)\s*)*{"
Local $sString = "Works all one one line.." & @CRLF & _
"" & @CRLF & _
"/**" & @CRLF & _
"* " & @CRLF & _
"* Some ignored comments here..." & @CRLF & _
"* @config { name:'Orange Title (70pt)'}" & @CRLF & _
"*/" & @CRLF & _
"h1.title_orange {" & @CRLF & _
"" & @CRLF & _
"}" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"Works on multiple lines, with extra lines in comment" & @CRLF & _
"" & @CRLF & _
"/**" & @CRLF & _
"* " & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"* Some ignored comments here..." & @CRLF & _
"* @config {" & @CRLF & _
" name:'Green Title (70pt)', " & @CRLF & _
" order:1" & @CRLF & _
" }" & @CRLF & _
"*/" & @CRLF & _
"div.green_title {" & @CRLF & _
"" & @CRLF & _
"}" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"Workson multiple lines, with extra lines in comment" & @CRLF & _
"" & @CRLF & _
"/**" & @CRLF & _
"* @config { name:'Blue Title (70pt)', " & @CRLF & _
" order:1 }" & @CRLF & _
"* comments coud be here" & @CRLF & _
"*" & @CRLF & _
"*/" & @CRLF & _
"span.blue {" & @CRLF & _
"" & @CRLF & _
"}" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"THis doesnt work due to the mutliple classes..... Not sure what im going to do with this yet, probably just match the first one - I suppose we could have multiple @config attributes matched in order to the definitions, but that sounds very hard...." & @CRLF & _
"" & @CRLF & _
"/** " & @CRLF & _
" * @config { name:'Blue Title (70pt)'}" & @CRLF & _
" */" & @CRLF & _
"div.blue, div.bigBlue {" & @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