mirror of https://github.com/mkerrisk/man-pages
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 <regex.h> > #include <sys/types.h> > #include <iostream> > > 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
This commit is contained in:
parent
80ee1d97e1
commit
bf6c69c999
40
man7/regex.7
40
man7/regex.7
|
@ -26,6 +26,10 @@
|
||||||
.\" I added an AUTHOR paragraph below - aeb.
|
.\" I added an AUTHOR paragraph below - aeb.
|
||||||
.\"
|
.\"
|
||||||
.\" In the default nroff environment there is no dagger \(dg.
|
.\" 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
|
.ie t .ds dg \(dg
|
||||||
.el .ds dg (!)
|
.el .ds dg (!)
|
||||||
.TH REGEX 7 1994-02-07
|
.TH REGEX 7 1994-02-07
|
||||||
|
@ -157,23 +161,25 @@ These stand for the character classes defined in
|
||||||
.BR wctype (3).
|
.BR wctype (3).
|
||||||
A locale may provide others.
|
A locale may provide others.
|
||||||
A character class may not be used as an endpoint of a range.
|
A character class may not be used as an endpoint of a range.
|
||||||
.PP
|
.\" As per http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=295666
|
||||||
There are two special cases\*(dg of bracket expressions:
|
.\" The following does not seem to apply in the glibc implementation
|
||||||
the bracket expressions `[[:<:]]' and `[[:>:]]' match the null string at
|
.\" .PP
|
||||||
the beginning and end of a word respectively.
|
.\" There are two special cases\*(dg of bracket expressions:
|
||||||
A word is defined as a sequence of
|
.\" the bracket expressions `[[:<:]]' and `[[:>:]]' match the null string at
|
||||||
word characters
|
.\" the beginning and end of a word respectively.
|
||||||
which is neither preceded nor followed by
|
.\" A word is defined as a sequence of
|
||||||
word characters.
|
.\" word characters
|
||||||
A word character is an
|
.\" which is neither preceded nor followed by
|
||||||
.I alnum
|
.\" word characters.
|
||||||
character (as defined by
|
.\" A word character is an
|
||||||
.BR wctype (3))
|
.\" .I alnum
|
||||||
or an underscore.
|
.\" character (as defined by
|
||||||
This is an extension,
|
.\" .BR wctype (3))
|
||||||
compatible with but not specified by POSIX 1003.2,
|
.\" or an underscore.
|
||||||
and should be used with
|
.\" This is an extension,
|
||||||
caution in software intended to be portable to other systems.
|
.\" 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
|
.PP
|
||||||
In the event that an RE could match more than one substring of a given
|
In the event that an RE could match more than one substring of a given
|
||||||
string,
|
string,
|
||||||
|
|
Loading…
Reference in New Issue