#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)var\s(\w+)\s?\=\s?(\d+|\"[^\n"]*\"|\'[^\n']*\')\s?\;"
Local $sString = "<html>" & @CRLF & _
"<head>~~</head>" & @CRLF & _
"<body>" & @CRLF & _
" <div>contents</div>" & @CRLF & _
" <script>" & @CRLF & _
"var value1 = 55;var value2= 27;" & @CRLF & _
"var value3 = 'T';var value4 = "FIT#$%SIZE";" & @CRLF & _
"var value5 = '{\"P00000WJ000E\":{\"stock_price\":\"0.00\",\"use_stock\":true,\"use_soldout\":\"T\",\"is_display\":\"T\",\"is_selling\":\"T\",\"option_price\":79000,\"option_name\":\"FIT#$%SIZE\",\"option_value\":\"NOBLE-44\",\"stock_number\":26,\"option_value_orginal\":[\"NOBLE\",\"44\"],\"use_stock_original\":\"T\",\"use_soldout_original\":\"T\",\"use_soldout_today_delivery\":\"F\",\"is_auto_soldout\":\"F\",\"is_mandatory\":\"T\",\"option_id\":\"000E\",\"is_reserve_stat\":\"N\",\"item_image_file\":null,\"origin_option_added_price\":\"0.00\"}}';var value6 = '1';var value7 = 'string;must-catch';" & @CRLF & _
"var value8 = 8;" & @CRLF & _
"var value9 = 'S';" & @CRLF & _
"var value10 = 'T';" & @CRLF & _
" </script>" & @CRLF & _
"</body>" & @CRLF & _
"</html>"
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