| @@ -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 |
192 | and should be used with | | 192 | and should be used with |
193 | caution in software intended to be portable to other systems. | | 193 | caution in software intended to be portable to other systems. |
194 | .It Dv REG_GNU | | 194 | .It Dv REG_GNU |
195 | Include GNU-inspired extensions: | | 195 | Include 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 |
199 | Use backreference | | 199 | Use backreference |
200 | .Dv N | | 200 | .Dv N |
201 | where | | 201 | where |
202 | .Dv N | | 202 | .Dv N |
203 | is between | | 203 | is between |
204 | .Dv [1-9] . | | 204 | .Dv [1-9] . |
| | | 205 | .It \ea |
| | | 206 | Visual Bell |
205 | .It \eb | | 207 | .It \eb |
206 | Match a position that is a word boundary. | | 208 | Match a position that is a word boundary. |
207 | .It \eB | | 209 | .It \eB |
208 | Match a position that is a not word boundary. | | 210 | Match a position that is a not word boundary. |
| | | 211 | .It \ef |
| | | 212 | Form Feed |
| | | 213 | .It \en |
| | | 214 | Line Feed |
| | | 215 | .It \er |
| | | 216 | Carriage return |
209 | .It \es | | 217 | .It \es |
210 | Alias for [[:space:]] | | 218 | Alias for [[:space:]] |
211 | .It \eS | | 219 | .It \eS |
212 | Alias for [^[:space:]] | | 220 | Alias for [^[:space:]] |
| | | 221 | .It \et |
| | | 222 | Horizontal Tab |
| | | 223 | .It \ev |
| | | 224 | Vertical Tab |
213 | .It \ew | | 225 | .It \ew |
214 | Alias for [[:alnum:]] | | 226 | Alias for [[:alnum:]] |
215 | .It \eW | | 227 | .It \eW |
216 | Alias for [^[:alnum:]] | | 228 | Alias for [^[:alnum:]] |
217 | .It \e' | | 229 | .It \e' |
218 | Matches the end of the subject. | | 230 | Matches the end of the subject. |
219 | .It \e` | | 231 | .It \e` |
220 | Matches the beginning of the subject. | | 232 | Matches the beginning of the subject. |
221 | .El | | 233 | .El |
222 | .Pp | | 234 | .Pp |
223 | This is an extension, | | 235 | This is an extension, |
224 | compatible with but not specified by | | 236 | compatible with but not specified by |
225 | .St -p1003.2 , | | 237 | .St -p1003.2 , |