From bf6c69c999f2b204c8084db33c9d1a8913b59bba Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Wed, 11 May 2005 16:06:19 +0000 Subject: [PATCH] Vincent Fourmond / Joey (Martin) Schulze Removed discussion of `[[:<:]]' and `[[:>:]]' since they do not seem to be in the glibc implementation. As per http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=295666 > The regex.7.gz mentions that [[:>:]] and [[:<:]] are available to designate word boundaries. > However, neither grep nor sed, which are build on the standard libc regcomp do recognise this syntax. > Moreover, the small program here > > #include > #include > #include > > using namespace std; > > int main() > { > regex_t RE; > int err_code = regcomp(&RE, "[[:<:]]", > REG_EXTENDED); > char Buffer[100]; > if(err_code) { > regerror(err_code, &RE, Buffer, 100); > cerr << "Error : " << Buffer << endl; > } > } > > > produces the following error message: > > Error : Invalid character class name --- man7/regex.7 | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/man7/regex.7 b/man7/regex.7 index 9a87d31d3..0167e7bc0 100644 --- a/man7/regex.7 +++ b/man7/regex.7 @@ -26,6 +26,10 @@ .\" I added an AUTHOR paragraph below - aeb. .\" .\" In the default nroff environment there is no dagger \(dg. +.\" +.\" 2005-05-11 Removed discussion of `[[:<:]]' and `[[:>:]]', which +.\" appear not to be in the glibc implementation of regcomp +.\" .ie t .ds dg \(dg .el .ds dg (!) .TH REGEX 7 1994-02-07 @@ -157,23 +161,25 @@ These stand for the character classes defined in .BR wctype (3). A locale may provide others. A character class may not be used as an endpoint of a range. -.PP -There are two special cases\*(dg of bracket expressions: -the bracket expressions `[[:<:]]' and `[[:>:]]' 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 -word characters. -A word character is an -.I alnum -character (as defined by -.BR wctype (3)) -or an underscore. -This is an extension, -compatible with but not specified by POSIX 1003.2, -and should be used with -caution in software intended to be portable to other systems. +.\" As per http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=295666 +.\" The following does not seem to apply in the glibc implementation +.\" .PP +.\" There are two special cases\*(dg of bracket expressions: +.\" the bracket expressions `[[:<:]]' and `[[:>:]]' 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 +.\" word characters. +.\" A word character is an +.\" .I alnum +.\" character (as defined by +.\" .BR wctype (3)) +.\" or an underscore. +.\" This is an extension, +.\" compatible with but not specified by POSIX 1003.2, +.\" and should be used with +.\" caution in software intended to be portable to other systems. .PP In the event that an RE could match more than one substring of a given string,