Skip to Content
XQuery
book

XQuery

by Priscilla Walmsley
March 2007
Intermediate to advanced
512 pages
21h 15m
English
O'Reilly Media, Inc.
Content preview from XQuery

Representing Any Character

The period (.) has special significance in regular expressions; it matches any character except the line feed character (#xA). The period character represents only one matching character, but a quantifier (such as *) can be applied to it to represent multiple characters. Table 18-6 shows some examples of the wildcard escape character in use.

Table 18-6. The wildcard escape character

Regular expression

Strings that match

Strings that do not match

[a]

f.o

fao, fbo, f2o

fo, fbbo

f..o

faao, fbco, f12o

fo, fao

f.*o

fo, fao, fbcde23o

f [a]

f\.o

f.o

fao

[a] Assume a line feed character between f and o. This string does not match unless you are in dot-all mode.

It is important to note that the period loses its wildcard power when placed in a character class expression (within square brackets).

Some XQuery functions (namely matches, replace, and tokenize) allow you to indicate that the processor should operate in dot-all mode. This is specified using the letter s in the $flags argument. In dot-all mode, the period matches any character whatsoever, including the line feed character (#xA). See "Using Flags," later in this chapter, for more information.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

XQuery, 2nd Edition

XQuery, 2nd Edition

Priscilla Walmsley
XPath and XPointer

XPath and XPointer

John Simpson
XSLT

XSLT

Doug Tidwell

Publisher Resources

ISBN: 0596006349Errata