The 'pattern' facet clearly requires more explanation than the brief description above. This XML Schema feature is based on the regular expression capabilities available in the Perl programming language, and is therefore very powerful, but also consequently quite complex.
The Pattern element holds a pattern in its Value attribute. The simplest possible form of pattern involves a series of characters that must be present, in the order specified, in each element or attribute definition that uses it. The following pattern restriction specifies that the value must be 'abc':
<pattern value="abc" />
In this simple form, a pattern is similar to an enumeration. Just as a restriction can contain multiple Enumeration elements, ...