Information technology — Guidance for the use of database language SQL — Part 1: XQuery regular expressions
Introduction: The organization of this document is as follows: 1) Clause 1, “Scope”, specifies the scope of this document. 2) Clause 2, “Normative references”, identifies additional standards that, through reference in this document, constitute provisions of this document. 3) Clause 3, “Terms and definitions”, defines the terms and definitions used in this document. 4) Clause 4, “XQuery regular expressions”, explains how XQuery regular expressions are formed. 5) Clause 5, “Operators using regular expressions”, explains how the SQL operators use regular expressions. © ISO/IEC 2021 – All rights reserved ISO/IEC 19075-1:2021(E)
Scope: This document describes the regular expression support in SQL (ISO/IEC 9075-2) adopted from the regular expression syntax of XQuery and XPath Functions and Operators 3.1, which is derived from Perl. This document discusses five operators using this regular expression syntax: LIKE_REGEX predicate, to determine the existence of a match to a regular expression. OCCURRENCES_REGEXnumericfunction,todeterminethenumberofmatchestoaregularexpression. POSITION_REGEX function, to determine the position of a match. SUBSTRING_REGEX function, to extract a substring matching a regular expression. TRANSLATE_REGEX function, to perform replacements using a regular expression. © ISO/IEC 2021 – All rights reserved ISO/IEC 9075-1, Information technology — Database languages — SQL — Part 1: Framework (SQL/Framework) ISO/IEC 9075-2, Information technology — Database languages — SQL — Part 2: Foundation (SQL/Foundation) ISO/IEC 9075-14, Information technology — Database languages — SQL — Part 14: XML-Related Specifications (SQL/XML) Bray, Tim et al.. Extensible Markup Language (XML) Version 1.0, W3C Recommendation [online]. Fifth Edition. Cambridge, Massachusetts, USA: W3C, 26 November 2008 . Available at http://www.w3.org/TR/xml Bray, Tim et al. Extensible Markup Language (XML) Version 1.1, W3C Recommendation [online]. Second Edition. Cambridge, Massachusetts, USA: W3C, 16 August 2006 . Available at http://www.w3.org/TR/xml11 Biron, Paul V.; Malhotra, Ashok. XML Schema Part 2: Datatypes, W3C Recommendation [online]. Second Edition. Cambridge, Massachusetts, USA: W3C, 28 October 2004 . Available at http://www.w3.org/TR/xmlschema-2/ Malhotra, Ashok et al.. XQuery and XPath Functions and Operators 3,1, W3C Recommendation [online]. Cambridge, Massachusetts, USA: W3C, 21 March 2017 . Available at http://www.w3.org/TR/- xpath-functions/ The Unicode Consortium. Unicode Regular Expressions [online]. 21. Mountain View, California, USA: TheUnicodeConsortium,2020-06-17.Availableathttp://www.unicode.org/reports/tr18/- tr18-21.html © ISO/IEC 2021 – All rights reserved ISO/IEC 19075-1:2021(E) 2 Normative references The following documents are referred to in the text in such a way that some or all of