Making REGEX_OPTIONAL greedy

Allows for arrays in default values for optional arguments. E.g., `@param {Array} [arr=[]]`. The current version would leave out the closing bracket.