better re syntax on optional square brackets.