#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(\/\/.*)"
Local $sString = "app.on('activate', function () {" & @CRLF & _
" // On macOS it's common to re-create a window in the app when the" & @CRLF & _
" // dock icon is clicked and there are no other windows open." & @CRLF & _
" if (mainWindow === null) {" & @CRLF & _
" createWindow() //inline comment" & @CRLF & _
" }" & @CRLF & _
"})" & @CRLF & _
"" & @CRLF & _
"// In this file you can include the rest of your app's specific main process" & @CRLF & _
"// code. You can also put them in separate files and require them here." & @CRLF & _
"" & @CRLF & _
"/*" & @CRLF & _
"multi line comment" & @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