BREs, this matches <replaceable>c</replaceable>) </entry>
</row>
<row>
<entry> <literal>{</literal> </entry>
<entry> when followed by a character other than a digit,
matches the left-brace character <literal>{</literal>;
when followed by a digit, it is the beginning of a
<replaceable>bound</replaceable> (see below) </entry>
</row>
<row>
<entry> <replaceable>x</replaceable> </entry>
<entry> where <replaceable>x</replaceable> is a single character with no other
significance, matches that character </entry>
</row>
</tbody>
</tgroup>
</table>
<para>
An RE cannot end with a backslash (<literal>\</literal>).
</para>
<note>
<para>
If you have <xref linkend="guc-standard-conforming-strings"/> turned off,
any backslashes you write in literal string constants will need to be
doubled. See <xref linkend="sql-syntax-strings"/> for more information.
</para>
</note>
<table id="posix-quantifiers-table">
<title>Regular Expression Quantifiers</title>
<tgroup cols="2">
<thead>
<row>
<entry>Quantifier</entry>
<entry>Matches</entry>
</row>
</thead>
<tbody>
<row>
<entry> <literal>*</literal> </entry>
<entry> a sequence of 0 or more matches of the atom </entry>
</row>
<row>
<entry> <literal>+</literal> </entry>
<entry> a sequence of 1 or more matches of the atom </entry>
</row>
<row>
<entry> <literal>?</literal> </entry>
<entry> a sequence of 0 or 1 matches of the atom </entry>
</row>
<row>
<entry> <literal>{</literal><replaceable>m</replaceable><literal>}</literal> </entry>
<entry> a sequence of exactly <replaceable>m</replaceable> matches of the atom </entry>
</row>
<row>
<entry> <literal>{</literal><replaceable>m</replaceable><literal>,}</literal> </entry>
<entry> a sequence of <replaceable>m</replaceable> or more matches of the atom </entry>
</row>
<row>
<entry>
<literal>{</literal><replaceable>m</replaceable><literal>,</literal><replaceable>n</replaceable><literal>}</literal> </entry>
<entry> a sequence of <replaceable>m</replaceable> through <replaceable>n</replaceable>
(inclusive) matches of the atom; <replaceable>m</replaceable> cannot exceed
<replaceable>n</replaceable> </entry>
</row>
<row>
<entry> <literal>*?</literal> </entry>
<entry> non-greedy version of <literal>*</literal> </entry>
</row>
<row>
<entry> <literal>+?</literal> </entry>
<entry> non-greedy version of <literal>+</literal> </entry>
</row>
<row>
<entry> <literal>??</literal> </entry>
<entry> non-greedy version of <literal>?</literal> </entry>
</row>
<row>
<entry> <literal>{</literal><replaceable>m</replaceable><literal>}?</literal> </entry>
<entry> non-greedy version of <literal>{</literal><replaceable>m</replaceable><literal>}</literal> </entry>
</row>
<row>
<entry> <literal>{</literal><replaceable>m</replaceable><literal>,}?</literal> </entry>
<entry> non-greedy version of <literal>{</literal><replaceable>m</replaceable><literal>,}</literal> </entry>
</row>
<row>
<entry>
<literal>{</literal><replaceable>m</replaceable><literal>,</literal><replaceable>n</replaceable><literal>}?</literal> </entry>
<entry> non-greedy version of <literal>{</literal><replaceable>m</replaceable><literal>,</literal><replaceable>n</replaceable><literal>}</literal> </entry>
</row>
</tbody>
</tgroup>
</table>
<para>
The forms using <literal>{</literal><replaceable>...</replaceable><literal>}</literal>
are known as <firstterm>bounds</firstterm>.
The numbers <replaceable>m</replaceable> and <replaceable>n</replaceable>