#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?i)(?:'(views\/[^']*)'|"(views\/[^"]*)")"
Local $sString = "return {" & @CRLF & _
" dayNames: $(dayKeys).map(function(i, val){" & @CRLF & _
" return Console.globalize.globalizeMessage("views/common/dates/days/full/" + val);" & @CRLF & _
" }).toArray()," & @CRLF & _
" dayNamesMin: $(dayKeys).map(function(i, val){" & @CRLF & _
" return Console.globalize.globalizeMessage("views/common/dates/days/abrv/" + val);" & @CRLF & _
" }).toArray()," & @CRLF & _
" monthNames: $(monthKeys).map(function(i, val){" & @CRLF & _
" return Console.globalize.globalizeMessage("views/common/dates/months/full/" + val);" & @CRLF & _
" }).toArray()," & @CRLF & _
" monthNamesShort: $(monthKeys).map(function(i, val){" & @CRLF & _
" return Console.globalize.globalizeMessage("views/common/dates/months/abrv/" + val);" & @CRLF & _
" }).toArray()," & @CRLF & _
" hourText: Console.globalize.globalizeMessage("views/common/dates/text/hour")," & @CRLF & _
" minuteText: Console.globalize.globalizeMessage("views/common/dates/text/minute")," & @CRLF & _
" secondText: Console.globalize.globalizeMessage("views/common/dates/text/second")," & @CRLF & _
" millisecText: Console.globalize.globalizeMessage("views/common/dates/text/millisecond")," & @CRLF & _
" microsecText: Console.globalize.globalizeMessage("views/common/dates/text/microsecond")," & @CRLF & _
" timeSuffix: Console.globalize.globalizeMessage("views/common/dates/text/time-suffix")," & @CRLF & _
" yearSuffix: Console.globalize.globalizeMessage("views/common/dates/text/year-suffix")," & @CRLF & _
" timeText: Console.globalize.globalizeMessage("views/common/dates/text/time")," & @CRLF & _
" timeOnlyTitle: Console.globalize.globalizeMessage("views/common/dates/text/time-only-title")," & @CRLF & _
" currentText: Console.globalize.globalizeMessage("views/common/dates/text/now")," & @CRLF & _
" closeText: Console.globalize.globalizeMessage("views/common/dates/text/close")," & @CRLF & _
" closeText: Console.globalize.globalizeMessage('views/common/dates/text/close')" & @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