From c45660d7d73f1e434f464e20a7ab4e8a07b40a37 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Mon, 9 Jun 2008 21:12:25 +0000 Subject: wrap long source lines --- man7/regex.7 | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) (limited to 'man7/regex.7') diff --git a/man7/regex.7 b/man7/regex.7 index 440cbde92b..88f58d26b6 100644 --- a/man7/regex.7 +++ b/man7/regex.7 @@ -59,9 +59,12 @@ It matches a match for the first, followed by a match for the second, etc. .PP A piece is an \fIatom\fR possibly followed by a single\*(dg \(aq*\(aq, \(aq+\(aq, \(aq?\(aq, or \fIbound\fR. -An atom followed by \(aq*\(aq matches a sequence of 0 or more matches of the atom. -An atom followed by \(aq+\(aq matches a sequence of 1 or more matches of the atom. -An atom followed by \(aq?\(aq matches a sequence of 0 or 1 matches of the atom. +An atom followed by \(aq*\(aq +matches a sequence of 0 or more matches of the atom. +An atom followed by \(aq+\(aq +matches a sequence of 1 or more matches of the atom. +An atom followed by \(aq?\(aq +matches a sequence of 0 or 1 matches of the atom. .PP A \fIbound\fR is \(aq{\(aq followed by an unsigned decimal integer, possibly followed by \(aq,\(aq @@ -81,8 +84,8 @@ An atom followed by a bound containing two integers \fIi\fR and \fIj\fR matches a sequence of \fIi\fR through \fIj\fR (inclusive) matches of the atom. .PP -An atom is a regular expression enclosed in "\fI()\fP" (matching a match for the -regular expression), +An atom is a regular expression enclosed in "\fI()\fP" +(matching a match for the regular expression), an empty set of "\fI()\fP" (matching the null string)\*(dg, a \fIbracket expression\fR (see below), \(aq.\(aq (matching any single character), \(aq^\(aq (matching the null string at the @@ -117,7 +120,8 @@ To include a literal \(aq]\(aq in the list, make it the first character To include a literal \(aq\-\(aq, make it the first or last character, or the second endpoint of a range. To use a literal \(aq\-\(aq as the first endpoint of a range, -enclose it in "\fI[.\fP" and "\fI.]\fP" to make it a collating element (see below). +enclose it in "\fI[.\fP" and "\fI.]\fP" +to make it a collating element (see below). With the exception of these and some combinations using \(aq[\(aq (see next paragraphs), all other special characters, including \(aq\e\(aq, lose their special significance within a bracket expression. @@ -138,14 +142,17 @@ Within a bracket expression, a collating element enclosed in "\fI[=\fP" and "\fI=]\fP" is an equivalence class, standing for the sequences of characters of all collating elements equivalent to that one, including itself. (If there are no other equivalent collating elements, -the treatment is as if the enclosing delimiters were "\fI[.\fP" and "\fI.]\fP".) +the treatment is as if the enclosing delimiters +were "\fI[.\fP" and "\fI.]\fP".) For example, if o and \o'o^' are the members of an equivalence class, -then "\fI[[=o=]]\fP", "\fI[[=\o'o^'=]]\fP", and "\fI[o\o'o^']\fP" are all synonymous. +then "\fI[[=o=]]\fP", "\fI[[=\o'o^'=]]\fP", +and "\fI[o\o'o^']\fP" are all synonymous. An equivalence class may not\*(dg be an endpoint of a range. .PP Within a bracket expression, the name of a \fIcharacter class\fR enclosed -in "\fI[:\fP" and "\fI:]\fP" stands for the list of all characters belonging to that +in "\fI[:\fP" and "\fI:]\fP" stands for the list +of all characters belonging to that class. Standard character class names are: .PP @@ -167,8 +174,8 @@ A character class may not be used as an endpoint of a range. .\" The following does not seem to apply in the glibc implementation .\" .PP .\" There are two special cases\*(dg of bracket expressions: -.\" the bracket expressions "\fI[[:<:]]\fP" and "\fI[[:>:]]\fP" match the null string at -.\" the beginning and end of a word respectively. +.\" the bracket expressions "\fI[[:<:]]\fP" and "\fI[[:>:]]\fP" match +.\" the null string at the beginning and end of a word respectively. .\" A word is defined as a sequence of .\" word characters .\" which is neither preceded nor followed by @@ -199,10 +206,12 @@ Match lengths are measured in characters, not collating elements. A null string is considered longer than no match at all. For example, "\fIbb*\fP" matches the three middle characters of "abbbc", -"\fI(wee|week)(knights|nights)\fP" matches all ten characters of "weeknights", +"\fI(wee|week)(knights|nights)\fP" +matches all ten characters of "weeknights", when "\fI(.*).*\fP" is matched against "abc" the parenthesized subexpression matches all three characters, and -when "\fI(a*)*\fP" is matched against "bc" both the whole RE and the parenthesized +when "\fI(a*)*\fP" is matched against "bc" +both the whole RE and the parenthesized subexpression match the null string. .PP If case-independent matching is specified, @@ -223,7 +232,8 @@ as an implementation can refuse to accept such REs and remain POSIX-compliant. .PP Obsolete ("basic") regular expressions differ in several respects. -\(aq|\(aq, \(aq+\(aq, and \(aq?\(aq are ordinary characters and there is no equivalent +\(aq|\(aq, \(aq+\(aq, and \(aq?\(aq are +ordinary characters and there is no equivalent for their functionality. The delimiters for bounds are "\fI\e{\fP" and "\fI\e}\fP", with \(aq{\(aq and \(aq}\(aq by themselves ordinary characters. -- cgit 1.2.3-korg