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

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

, and
1987
. The subexpression that starts with the
n
th left parenthesis in the regular expression delivers the
n
th captured group in the result.

Some parenthesized subexpressions might not match any part of the string. For example, if the regex
([0-9]+)|([A-Z]+)
is used to match the string
12
, the first captured subgroup will be
12
and the second will be empty.

A parenthesized subexpression might also match more than one substring. For example, if the regex
([0-9]+)(,[0-9]+)*
is used to match the string
12,13,14
, then the second part in parentheses matches both
,13
and
,14
. In this case only the last one is captured. The first captured group in this example will be
12
, and the second will be
,14
.

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

Other books

Knight's Mistress by C. C. Gibbs
The Shadow of War by Stewart Binns
The Last Conquest by Coates, Berwick
The Grasshopper King by Jordan Ellenberg
Loves Redemption by Kimberly Kaye Terry
Fallen Angel by Jones, Melissa
The Bride's Kimono by Sujata Massey
Come Along with Me by Shirley Jackson
Rebel by Mike Shepherd