Appendix B. XML Schema Regular Expressions

A regular expression is a kind of mini programming language used for text pattern matching. Regular expressions have been around for a long time and are supported by many different tools and programming languages, including Java, Perl, Python, sed, awk, procmail, grep, vi, and emacs, to name a few.[1] Although the exact syntax used for regular expressions varies from one technology to the next, the fundamentals are the same.[2]

In XML schemas, regular expressions are used with the pattern facet to restrict the values allowed for a derived simple type. Regular expressions tell us which characters can be used for a simple type value.

For example, we can decide that a phone number should contain only digits. ...

Get J2EE™ Web Services now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.