#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "((\w+|\-)+)(\W*):(?=(.+);)"
Local $sString = "#LasVegas .billboard { text-decoration: blink; }" & @CRLF & _
"" & @CRLF & _
".ninja, #Snowden { visibility: hidden; }" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
".oliveoil" & @CRLF & _
"{" & @CRLF & _
" z-index: 1;" & @CRLF & _
"}" & @CRLF & _
".water" & @CRLF & _
"{" & @CRLF & _
" z-index: 0;" & @CRLF & _
"}" & @CRLF & _
"" & @CRLF & _
"#poop {" & @CRLF & _
" float : none ;" & @CRLF & _
" color : brown ;" & @CRLF & _
"" & @CRLF & _
" width : 15cm ;" & @CRLF & _
" height : 120cm ;" & @CRLF & _
"}" & @CRLF & _
"" & @CRLF & _
".God { position: absolute; display: none; }" & @CRLF & _
"#blackhole { padding: -9999em; }" & @CRLF & _
"" & @CRLF & _
".word { font-family: "Comic Sans", "Times New Roman", sans-serif ; }"
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYFULLMATCH)
; 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