Added regex for square brackets