re_format.7 (72205) | re_format.7 (79754) |
---|---|
1.\" Copyright (c) 1992, 1993, 1994 Henry Spencer. 2.\" Copyright (c) 1992, 1993, 1994 3.\" The Regents of the University of California. All rights reserved. 4.\" 5.\" This code is derived from software contributed to Berkeley by 6.\" Henry Spencer. 7.\" 8.\" Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34.\" SUCH DAMAGE. 35.\" 36.\" @(#)re_format.7 8.3 (Berkeley) 3/20/94 | 1.\" Copyright (c) 1992, 1993, 1994 Henry Spencer. 2.\" Copyright (c) 1992, 1993, 1994 3.\" The Regents of the University of California. All rights reserved. 4.\" 5.\" This code is derived from software contributed to Berkeley by 6.\" Henry Spencer. 7.\" 8.\" Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34.\" SUCH DAMAGE. 35.\" 36.\" @(#)re_format.7 8.3 (Berkeley) 3/20/94 |
37.\" $FreeBSD: head/lib/libc/regex/re_format.7 72205 2001-02-09 09:08:53Z ru $ | 37.\" $FreeBSD: head/lib/libc/regex/re_format.7 79754 2001-07-15 07:53:42Z dd $ |
38.\" 39.Dd March 20, 1994 40.Dt RE_FORMAT 7 41.Os 42.Sh NAME 43.Nm re_format 44.Nd POSIX 1003.2 regular expressions 45.Sh DESCRIPTION --- 179 unchanged lines hidden (view full) --- 225or a collating-sequence name for either) 226enclosed in 227.Ql [.\& 228and 229.Ql .]\& 230stands for the 231sequence of characters of that collating element. 232The sequence is a single element of the bracket expression's list. | 38.\" 39.Dd March 20, 1994 40.Dt RE_FORMAT 7 41.Os 42.Sh NAME 43.Nm re_format 44.Nd POSIX 1003.2 regular expressions 45.Sh DESCRIPTION --- 179 unchanged lines hidden (view full) --- 225or a collating-sequence name for either) 226enclosed in 227.Ql [.\& 228and 229.Ql .]\& 230stands for the 231sequence of characters of that collating element. 232The sequence is a single element of the bracket expression's list. |
233A bracket expression containing a multi-character collating element | 233A bracket expression containing a multi-character collating element |
234can thus match more than one character, 235e.g. if the collating sequence includes a 236.Ql ch 237collating element, 238then the RE 239.Ql [[.ch.]]*c 240matches the first five characters 241of --- 172 unchanged lines hidden (view full) --- 414.Ql \&* 415is an ordinary character if it appears at the beginning of the 416RE or the beginning of a parenthesized subexpression 417(after a possible leading 418.Ql \&^ ) . 419Finally, there is one new type of atom, a 420.Em back reference : 421.Ql \e | 234can thus match more than one character, 235e.g. if the collating sequence includes a 236.Ql ch 237collating element, 238then the RE 239.Ql [[.ch.]]*c 240matches the first five characters 241of --- 172 unchanged lines hidden (view full) --- 414.Ql \&* 415is an ordinary character if it appears at the beginning of the 416RE or the beginning of a parenthesized subexpression 417(after a possible leading 418.Ql \&^ ) . 419Finally, there is one new type of atom, a 420.Em back reference : 421.Ql \e |
422followed by a non-zero decimal digit | 422followed by a non-zero decimal digit |
423.Em d 424matches the same sequence of characters 425matched by the 426.Em d Ns th 427parenthesized subexpression 428(numbering subexpressions by the positions of their opening parentheses, 429left to right), 430so that (e.g.) --- 46 unchanged lines hidden --- | 423.Em d 424matches the same sequence of characters 425matched by the 426.Em d Ns th 427parenthesized subexpression 428(numbering subexpressions by the positions of their opening parentheses, 429left to right), 430so that (e.g.) --- 46 unchanged lines hidden --- |