RegEx expression to create a new array

RegEx expression to create a new array

VisualSim allows the modeler to create new arrays of String, Integer, Double, etc using a RegEx function newArray(array length, Type)

Create a new integer array with 10 items
array1 = newArray(10,0) // Here 10 is the number of items, 0 is the array value

Result: array1 = {0,0,0,0,0,0,0,0,0,0}

Create a new String Array with 5 items
array2 = newArray(5,"none")
Result: array2 = {"none","none","none","none","none"}