Added support for escape patterns for square brackets