#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "define[\s]*\([\s]*\["
Local $sString = "define(function(require, exports, module) {" & @CRLF & _
" var UIKit = require('uikit/uikit');" & @CRLF & _
" var ExtendUtil = require('helpers/extend.util');" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
" var ConfirmModalView = UIKit.Modal2.extend({" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"define([" & @CRLF & _
" 'underscore'," & @CRLF & _
" 'marionette'," & @CRLF & _
"" & @CRLF & _
" '../libs/spf.helper'," & @CRLF & _
"" & @CRLF & _
" '../templates'," & @CRLF & _
"" & @CRLF & _
" 'uikit/injector'," & @CRLF & _
" 'uikit/component.collection.view'," & @CRLF & _
" 'uikit/grid'," & @CRLF & _
" 'uikit/table'," & @CRLF & _
" 'uikit/text'," & @CRLF & _
" 'uikit/button'" & @CRLF & _
" ], function(_, Mn," & @CRLF & _
" // data stuff" & @CRLF & _
" SPFHelper," & @CRLF & _
"" & @CRLF & _
" Templates," & @CRLF & _
" // view stuff" & @CRLF & _
" InjectorView, ComponentCollectionView, GridView, TableView, TextView, ButtonView) {"
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