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

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

,
)
,
[
or
]
escaped by preceding it with a backslash
\
, or one of the symbols
\n
,
\r
,
\t
representing a newline, carriage return, or tab, respectively.

Construct
Matches a string S if . . .
A|B
S matches either A or B.
AB
The first part of S matches A and the rest matches B.
A?
S either matches A or is empty.
A*
S is a sequence of zero or more strings that each match A.
A+
S is a sequence of one or more strings that each match A.
A{n,m}
S is a sequence of between n and m strings that each match A.
A{n,}
S is a sequence of n or more strings that each match A.
A{n}
S is a sequence of exactly n strings that each match A.
Q?
Where Q is one of the regular expressions described in the previous six rows: matches the same strings as Q, but using nongreedy matching.
(A)
S matches A.
c
S consists of the single character c.
[abc]
S consists of one of the characters a, b, or c.
[

abc]
S consists of a single character that is not one of a, b, or c.
[a-b]
S is a character whose Unicode codepoint is in the range a to b.
\p{prop}
S is a character that has property prop in the Unicode database.
\P{prop}
S is a character that does not have property prop in the Unicode database.
.
S is any single character (in dot-all mode) or any single character other than a newline (when not in dot-all mode).
\s
S is a single space, tab, newline, or carriage return.
\S
S is a character that does not match \s.
\i
S is a character that can appear at the start of an XML Name.
\I
S is a character that does not match \i.
\c
S is a character that can appear in an XML Name.
\C
S is a character that does not match \c.
\d
S is a character classified in Unicode as a digit.
\D
S is a character that does not match \d.
\w
S is a character that does not match \W.
\W
S is a character that is classified in Unicode as a punctuation, separator, or “other” character.

Matches the start of the input string, or the start of a line if in multiline mode.
$
Matches the end of the input string, or the end of a line if in multiline mode.

Other books

Heat Rises by Castle, Richard
Nashville Chrome by Rick Bass
Magic Time: Ghostlands by Marc Scott Zicree, Robert Charles Wilson
Skinner's Ghosts by Jardine, Quintin
Secret of the Shadows by Cathy MacPhail
El secreto de los Medici by Michael White