XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition (639 page)

BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition
7.46Mb size Format: txt, pdf, ePub
ads

consists of two pieces,
[a-z]
and
[0-9]
, and it matches any string that consists of a letter in the range
[a-z]
followed by a digit in the range
[0-9]
.

A
piece
is an
atom
, optionally followed by a
quantifier
. Quantifiers are described in the next section.

Unlike content models in XML Schema, there are no rules preventing ambiguities or backtracking in a regular expression. It is perfectly legal to have a regex with two branches that both match the same string, or to have two branches that start with the same characters, for example
abc|abd
.

Quantifiers

Quantifiers indicate whether, and how often, a construct may be repeated. The syntax is as follows:

Construct
Syntax
quantifier
indicator
?
?
indicator
?
|
*
|
+
| (
{
quantity
}
)
quantity
quantRange | quantMin | quantExact
quantRange
quantExact
,
quantExact
quantMin
quantExact
,
BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition
7.46Mb size Format: txt, pdf, ePub
ads

Other books

Benedict Cumberbatch by Justin Lewis
Acapulco Nights by K. J. Gillenwater
Anything Can Happen by Roger Rosenblatt
Maximum Ice by Kay Kenyon
Strike by Sheryl Zaines
A Fear of Dark Water by Craig Russell
The Target by David Baldacci
The Tenth Song by Naomi Ragen