#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^\s+\"#{prefix}\.(.+)\":"
Local $sString = ""use strict"" & @CRLF & _
"" & @CRLF & _
"define ->" & @CRLF & _
"" & @CRLF & _
" launchOptions = (prefix) ->" & @CRLF & _
" options =" & @CRLF & _
" "#{prefix}.businessCredits.businessBudgetFacility": functionDetails: functionId : "be.kbc.businessCredits.businessBudgetFacility", mode: "create"" & @CRLF & _
" "#{prefix}.businessCredits.taxPrepaymentPlan": functionDetails: functionId : "be.kbc.businessCredits.taxPrepaymentPlan", mode: "create"" & @CRLF & _
" "#{prefix}.credits.privateCreditCardRequest.update": functionDetails: functionId : "be.kbc.credits.privateCreditCardRequest", mode: "update"" & @CRLF & _
" "#{prefix}.credits.homeAtOnce": functionDetails: functionId : "be.kbc.credits.homeAtOnce", mode: "createRequest"" & @CRLF & _
" "#{prefix}.credits.homeAtOnce.detailRequest": functionDetails: functionId : "be.kbc.credits.homeAtOnce", mode: "detailRequest"" & @CRLF & _
" "#{prefix}.credits.homeAtOnce.editRequest": functionDetails: functionId : "be.kbc.credits.homeAtOnce", mode: "editRequest"" & @CRLF & _
" "#{prefix}.credits.homeAtOnce.updateRequest": functionDetails: functionId : "be.kbc.credits.homeAtOnce", mode: "updateRequest"" & @CRLF & _
" "#{prefix}.credits.budgetfacilitylight": functionDetails: functionId : "be.kbc.credits.budgetFacilityLight", mode: "create"" & @CRLF & _
" "#{prefix}.credits.loaRequest": functionDetails: functionId : "be.kbc.credits.loaRequest", mode: "create"" & @CRLF & _
" "#{prefix}.credits.loaRequest.update": functionDetails: functionId : "be.kbc.credits.loaRequest", mode: "update"" & @CRLF & _
" "#{prefix}.doccle.doccleAccount": functionDetails: functionId : "be.kbc.doccle.doccleAccount", mode: "create"" & @CRLF & _
" "#{prefix}.esigning.esigning": functionDetails: functionId : "be.kbc.esigning.esigning", mode: "create"" & @CRLF & _
" "#{prefix}.esigning.esigning.createBundle": functionDetails: functionId : "be.kbc.esigning.esigning", mode: "createBundle"" & @CRLF & _
" "#{prefix}.home.dinoHomeInsurance": functionDetails: functionId : "be.kbc.home.dinoHomeInsurance", mode: "create"" & @CRLF & _
" "#{prefix}.home.energyRenovationAdvice": functionDetails: functionId : "be.kbc.home.era", mode: "create"" & @CRLF & _
" "#{prefix}.insurances.smallProducts": functionDetails: functionId : "be.kbc.insurances.smallProducts", mode: "create"" & @CRLF & _
" "#{prefix}.insurances.smallproducts.external": functionDetails: functionId : "be.kbc.insurances.smallProducts", mode: "create"" & @CRLF & _
" "#{prefix}.insurances.insurancesUpsell": functionDetails: functionId : "be.kbc.insurances.insurancesUpsell", mode: "create"" & @CRLF & _
" "#{prefix}.investments.buycooperativeshares": functionDetails: functionId : "be.kbc.investments.buyCooperativeShares", mode: "create"" & @CRLF & _
" "#{prefix}.savings.acceptSavingsAccount": functionDetails: functionId : "be.kbc.savings.acceptSavingsAccount", mode: "create"" & @CRLF & _
" "#{prefix}.savings.manageAccountInsurance": functionDetails: functionId : "be.kbc.savings.manageAccountInsurance", mode: "create"" & @CRLF & _
" "#{prefix}.savings.manageAccountInsurance.delete": functionDetails: functionId : "be.kbc.savings.manageAccountInsurance", mode: "delete"" & @CRLF & _
" "#{prefix}.savings.openSavingsAccount": functionDetails: functionId : "be.kbc.savings.openSavingsAccount", mode: "create"" & @CRLF & _
" "#{prefix}.savings.settleSavingsAccount": functionDetails: functionId : "be.kbc.savings.settleSavingsAccount", mode: "create"" & @CRLF & _
" "#{prefix}.payments.businessAccountRequest": functionDetails: functionId : "be.kbc.payments.businessAccountRequest", mode: "create"" & @CRLF & _
" "#{prefix}.payments.cardPhoto": functionDetails: functionId : "be.kbc.payments.cardPhoto", mode: "create"" & @CRLF & _
" "#{prefix}.payments.preaccountrequest": functionDetails: functionId : "be.kbc.payments.preAccountRequest", mode: "create"" & @CRLF & _
" "#{prefix}.payments.privateAccountRequest": functionDetails: functionId : "be.kbc.payments.privateAccountRequest", mode: "create"" & @CRLF & _
" "#{prefix}.payments.businessCreditCardRequest": functionDetails: functionId : "be.kbc.payments.businessCreditCardRequest", mode: "create"" & @CRLF & _
" "#{prefix}.payments.preCardRequest": functionDetails: functionId : "be.kbc.payments.preCardRequest", mode: "create"" & @CRLF & _
" "#{prefix}.payments.preCardRequest.createReplacement": functionDetails: functionId : "be.kbc.payments.preCardRequest", mode: "createReplacement"" & @CRLF & _
" "#{prefix}.vehicle.dinoCarInsurance": functionDetails: functionId : "be.kbc.vehicle.dinoCarInsurance", mode: "create"" & @CRLF & _
" "#{prefix}.vehicle.privateLease": functionDetails: functionId : "be.kbc.vehicle.privateLease", mode: "create"" & @CRLF & _
" "#{prefix}.vehicle.privateLease.update": functionDetails: functionId : "be.kbc.vehicle.privateLease", mode: "update"" & @CRLF & _
"" & @CRLF & _
" # Note: the deeplinks below are for local development testing only, the won't be available in the pillars" & @CRLF & _
" # coffeelint: disable=no_backticks" & @CRLF & _
" `//>>includeStart("local", pragmas.local)`" & @CRLF & _
" options["#{prefix}.credits.genericRequest"] = functionDetails: functionId : "be.kbc.credits.genericRequest", mode: "create"" & @CRLF & _
" options["#{prefix}.credits.genericRequest.continue"] = functionDetails: functionId : "be.kbc.credits.genericRequest", mode: "continue"" & @CRLF & _
" `//>>includeEnd("local")`" & @CRLF & _
"" & @CRLF & _
" return options" & @CRLF & _
"" & @CRLF & _
" return launchOptions" & @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