O'Reilly logo

Definitive XML Schema, Second Edition by Priscilla Walmsley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9. Regular expressions

Regular expressions are used in XML Schema to restrict the values of simple types to certain patterns of characters. For example, a pattern could specify that an SKU must be three digits, followed by a hyphen, followed by two uppercase letters. This chapter explains the XML Schema syntax for regular expressions.

9.1. The structure of a regular expression

XML Schema’s regular expression language is very similar to that of the Perl programming language. Regular expressions, also known as “regexes,” are made up of branches, which are in turn made up of pieces. Each piece consists of one atom and an optional quantifier.

For example, suppose the product number in your organization can either be an SKU or a 7-digit number. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required