Appendix D. Regular Expressions

Introduction

This appendix provides an overview of the XQuery regular expression syntax, which is based on the syntax used by XML Schema. In theory, this is the syntax supported by all XQuery implementations, although in practice you may find that your implementation varies slightly from the description here. When in doubt, consult the documentation accompanying your implementation.

This appendix begins with an overview of the regular expression syntax used by the built-in matches() and replace() functions (see Appendix C). It then provides a grammar for this regular expression language (Listing D.6) and a table of the Unicode properties (Table D.3).

Overview

Regular expressions, also known as regexps or regexes, provide ...

Get XQuery: The XML Query Language now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.