#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?im)\bbb-([\w\.]+(?::.+)?)=\"([\w\.:]+?)\"\s?"
Local $sString = "<div class="theme-black" style="padding: 20px;background-color: #fff;">" & @CRLF & _
" <input type="text" class="text" bb-model="color:keyup" bb-change="handleChange1" value="{{color}}" />" & @CRLF & _
" <input type="text" class="text" bb-model="color:keyup" bb-change="handleChange1" value="{{color}}" />" & @CRLF & _
" <input type="text" class="text" bb-model="args.color:keyup" value="{{args.color}}" />" & @CRLF & _
" <input type="text" class="text" bb-model="color1:keyup" value="{{color1}}" />" & @CRLF & _
" <input type="text" class="text" bb-model="args.color1:keyup" value="{{args.color1}}" />" & @CRLF & _
" <textarea bb-model="color:keyup">{{color}}</textarea>" & @CRLF & _
" <br>" & @CRLF & _
" <input type="button" value="值1(#999)" bb-click="submit1">" & @CRLF & _
" <input type="button" value="值1(#999)" bb-click="submit1">" & @CRLF & _
" <input type="button" value="值2(#ff5241)" bb-click="submit2">" & @CRLF & _
" <div class="result1 " bb-watch="color:style:html" bb-change="handleChange" style="color: {{color}};">{{color}}</div>" & @CRLF & _
" <div class="result2 " bb-watch="args.color:style:html" style="color: {{args.color}};">{{args.color}}</div>" & @CRLF & _
" <input type="button" value="dom替换3(#999)" bb-click="submit3">" & @CRLF & _
" <input type="button" value="dom替换4(#ff5241)" bb-click="submit4">" & @CRLF & _
" <div class="result3 " bb-watch="color1:style:html" style="color: {{color1}};">{{color1}}</div>" & @CRLF & _
" <div class="result4 " bb-watch="args.color1:style:html" style="color: {{args.color1}};">{{args.color1}}</div>" & @CRLF & _
" <br>" & @CRLF & _
" <input type="button" value="模拟组件传入数据(_reset)" bb-click:enter="submit5">" & @CRLF & _
" <div class="all1" bb-watch="color:style:html" style="color: {{color}};">{{color}}</div>" & @CRLF & _
" <div class="all2" bb-watch="color1:style:html" style="color: {{color1}};">{{color1}}</div>" & @CRLF & _
" <div class="all3" bb-watch="args.color:style:html" style="color: {{args.color}};">{{args.color}}</div>" & @CRLF & _
" <div class="all4" bb-watch="args.color1:style:html" style="color: {{args.color1}};">{{args.color1}}</div>" & @CRLF & _
" <div class="all5" bb-watch="args.color:style,args.color1:html" style="color: {{args.color}};">{{args.color1}}</div>" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
" <input type="button" bb-click="tab1" value="切换(00)" class="abutton faiButton faiButton-hover" style="margin-top:5px;" />" & @CRLF & _
" <input type="button" bb-click="tab2" value="切换(01)" class="abutton faiButton faiButton-hover" style="margin-top:5px;" />" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
" <div bb-watch="tab:style" style="display: {{#compare tab '===' '00'}}block;{{else}}none;{{/compare}}">00</div>" & @CRLF & _
" <div bb-watch="tab:style" style="display: {{#compare tab '===' '01'}}block;{{else}}none;{{/compare}}">01</div>" & @CRLF & _
"</div>"
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