For example, we can match either the opening or closing square bracket with the following: <xs:pattern value="[\[\]]" />