#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(?<=params\.).*?(?=\])"
Local $sString = "function pastEvents(username, params) { // 305" & @CRLF & _
" /** //" & @CRLF & _
" * @description Docs: http://www.songkick.com/developer/past-events-for-user //" & @CRLF & _
" * @param {string} username //" & @CRLF & _
" * @param {object} [params={}] //" & @CRLF & _
" * @param {number} [params.page=1] //" & @CRLF & _
" * @param {number} [params.per_page=50] - 50 is the max //" & @CRLF & _
" * @param {string} [params.order='asc'] - 'asc' or 'desc' //" & @CRLF & _
" * @returns {Promise} //" & @CRLF & _
" */ //" & @CRLF & _
" params = params ? params : {}; // 315" & @CRLF & _
" var url = _this.user.baseURL + username + '/gigography.' + _this.format + '?apikey='; // 316" & @CRLF & _
" return _performRequest(url, params); // 318" & @CRLF & _
" }"
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