#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?im)@param\s+\{\(?([^}]+)\)?\}\s+(\[.+\]|[\w]+(?:\[.+\])?)\s+([\s\S]*?)(?=\@|\*\/)"
Local $sString = "/**" & @CRLF & _
" * Removes elements from \`array\` corresponding to \`indexes\` and returns an" & @CRLF & _
" * array of removed elements." & @CRLF & _
" *" & @CRLF & _
" * **Note:** Unlike \`_.at\`, this method mutates \`array\`." & @CRLF & _
" *" & @CRLF & _
" * @static" & @CRLF & _
" * @memberOf _" & @CRLF & _
" * @category Array" & @CRLF & _
" * @param {Array} array The array to modify." & @CRLF & _
" * @param {...(number|number[])} [indexes] The indexes of elements to remove," & @CRLF & _
" * specified individually or in arrays." & @CRLF & _
" * @returns {Array} Returns the new array of removed elements." & @CRLF & _
" * @example" & @CRLF & _
" *" & @CRLF & _
" * var array = [5, 10, 15, 20];" & @CRLF & _
" * var evens = _.pullAt(array, 1, 3);" & @CRLF & _
" *" & @CRLF & _
" * console.log(array);" & @CRLF & _
" * // => [5, 15]" & @CRLF & _
" *" & @CRLF & _
" * console.log(evens);" & @CRLF & _
" * // => [10, 20]" & @CRLF & _
" */" & @CRLF & _
"var pullAt = rest(function(array, indexes) {" & @CRLF & _
" indexes = arrayMap(baseFlatten(indexes), String);" & @CRLF & _
"" & @CRLF & _
" var result = baseAt(array, indexes);" & @CRLF & _
" basePullAt(array, indexes.sort(compareAscending));" & @CRLF & _
" return result;" & @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