Thu Mar 11 15:12:51 2021 UTC ()
Document the "C" language escapes supported in GNU mode.


(christos)
diff -r1.28 -r1.29 src/lib/libc/regex/regex.3

cvs diff -r1.28 -r1.29 src/lib/libc/regex/regex.3 (expand / switch to unified diff)

--- src/lib/libc/regex/regex.3 2021/02/24 09:10:12 1.28
+++ src/lib/libc/regex/regex.3 2021/03/11 15:12:51 1.29
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: regex.3,v 1.28 2021/02/24 09:10:12 wiz Exp $ 1.\" $NetBSD: regex.3,v 1.29 2021/03/11 15:12:51 christos Exp $
2.\" 2.\"
3.\" Copyright (c) 1992, 1993, 1994 Henry Spencer. 3.\" Copyright (c) 1992, 1993, 1994 Henry Spencer.
4.\" Copyright (c) 1992, 1993, 1994 4.\" Copyright (c) 1992, 1993, 1994
5.\" The Regents of the University of California. All rights reserved. 5.\" The Regents of the University of California. All rights reserved.
6.\" 6.\"
7.\" This code is derived from software contributed to Berkeley by 7.\" This code is derived from software contributed to Berkeley by
8.\" Henry Spencer. 8.\" Henry Spencer.
9.\" 9.\"
10.\" Redistribution and use in source and binary forms, with or without 10.\" Redistribution and use in source and binary forms, with or without
11.\" modification, are permitted provided that the following conditions 11.\" modification, are permitted provided that the following conditions
12.\" are met: 12.\" are met:
13.\" 1. Redistributions of source code must retain the above copyright 13.\" 1. Redistributions of source code must retain the above copyright
14.\" notice, this list of conditions and the following disclaimer. 14.\" notice, this list of conditions and the following disclaimer.
@@ -24,27 +24,27 @@ @@ -24,27 +24,27 @@
24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32.\" SUCH DAMAGE. 32.\" SUCH DAMAGE.
33.\" 33.\"
34.\" @(#)regex.3 8.4 (Berkeley) 3/20/94 34.\" @(#)regex.3 8.4 (Berkeley) 3/20/94
35.\" $FreeBSD: head/lib/libc/regex/regex.3 363817 2020-08-04 02:06:49Z kevans $ 35.\" $FreeBSD: head/lib/libc/regex/regex.3 363817 2020-08-04 02:06:49Z kevans $
36.\" 36.\"
37.Dd February 22, 2021 37.Dd March 11, 2021
38.Dt REGEX 3 38.Dt REGEX 3
39.Os 39.Os
40.Sh NAME 40.Sh NAME
41.Nm regcomp , 41.Nm regcomp ,
42.Nm regexec , 42.Nm regexec ,
43.Nm regerror , 43.Nm regerror ,
44.Nm regfree , 44.Nm regfree ,
45.Nm regasub , 45.Nm regasub ,
46.Nm regnsub 46.Nm regnsub
47.Nd regular-expression library 47.Nd regular-expression library
48.Sh LIBRARY 48.Sh LIBRARY
49.Lb libc 49.Lb libc
50.Sh SYNOPSIS 50.Sh SYNOPSIS
@@ -192,34 +192,46 @@ compatible with but not specified by @@ -192,34 +192,46 @@ compatible with but not specified by
192and should be used with 192and should be used with
193caution in software intended to be portable to other systems. 193caution in software intended to be portable to other systems.
194.It Dv REG_GNU 194.It Dv REG_GNU
195Include GNU-inspired extensions: 195Include GNU-inspired extensions:
196.Pp 196.Pp
197.Bl -tag -offset indent -width XX -compact  197.Bl -tag -offset indent -width XX -compact
198.It \eN 198.It \eN
199Use backreference 199Use backreference
200.Dv N 200.Dv N
201where 201where
202.Dv N 202.Dv N
203is between 203is between
204.Dv [1-9] . 204.Dv [1-9] .
 205.It \ea
 206Visual Bell
205.It \eb 207.It \eb
206Match a position that is a word boundary. 208Match a position that is a word boundary.
207.It \eB 209.It \eB
208Match a position that is a not word boundary. 210Match a position that is a not word boundary.
 211.It \ef
 212Form Feed
 213.It \en
 214Line Feed
 215.It \er
 216Carriage return
209.It \es 217.It \es
210Alias for [[:space:]] 218Alias for [[:space:]]
211.It \eS 219.It \eS
212Alias for [^[:space:]] 220Alias for [^[:space:]]
 221.It \et
 222Horizontal Tab
 223.It \ev
 224Vertical Tab
213.It \ew 225.It \ew
214Alias for [[:alnum:]] 226Alias for [[:alnum:]]
215.It \eW 227.It \eW
216Alias for [^[:alnum:]] 228Alias for [^[:alnum:]]
217.It \e' 229.It \e'
218Matches the end of the subject. 230Matches the end of the subject.
219.It \e` 231.It \e`
220Matches the beginning of the subject. 232Matches the beginning of the subject.
221.El 233.El
222.Pp 234.Pp
223This is an extension, 235This is an extension,
224compatible with but not specified by 236compatible with but not specified by
225.St -p1003.2 , 237.St -p1003.2 ,