#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?ms)(?<=\/\/\s*COLORS)[\r\n]+(.*)(?=\/\/\s*END\s*COLORS)"
Local $sString = "// COLORS" & @CRLF & _
"$nipiter-green : #158C3F;" & @CRLF & _
"$green : #048e3c;" & @CRLF & _
"$light-green : #C4E2CF;" & @CRLF & _
"$nipiter-red : #e11b1c;" & @CRLF & _
"$dark-red : #a11b1b;" & @CRLF & _
"$black : #000000;" & @CRLF & _
"$dark-gray : #4c4c4c;" & @CRLF & _
"$gray : #e4e4e4;" & @CRLF & _
"$white : #ffffff;" & @CRLF & _
"$transparent-white : rgba(255, 255, 255, 0.59);" & @CRLF & _
"$feminist-purple : #2a1736;" & @CRLF & _
"" & @CRLF & _
"$yellow : #ffff73;" & @CRLF & _
"$twitter-blue : #5a8dbd;" & @CRLF & _
"$facebook-blue : #184f83;" & @CRLF & _
"// END COLORS"
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