X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=doc%2Fregex.texi;h=59dfd8b8bd26747ce38e5647833e2c291619c365;hb=a83a25fd19a04a9ec3dedd34f7e36c4cefe6f8ca;hp=2c0e9d23bcde98f6a13a213e0357e7c7d2eb8950;hpb=d1fb15ba12436afdd742eaff1ec46f75ee397bda;p=gnulib.git diff --git a/doc/regex.texi b/doc/regex.texi index 2c0e9d23b..59dfd8b8b 100644 --- a/doc/regex.texi +++ b/doc/regex.texi @@ -36,10 +36,8 @@ converted to the internal format used by the library functions. Once you've compiled a pattern, you can use it for matching or searching any number of times. -The Regex library consists of two source files: @file{regex.h} and -@file{regex.c}. +The Regex library is used by including @file{regex.h}. @pindex regex.h -@pindex regex.c Regex provides three groups of functions with which you can operate on regular expressions. One group---the @sc{gnu} group---is more powerful but not completely compatible with the other two, namely the @sc{posix} @@ -272,9 +270,9 @@ Grep, Egrep---in addition to syntaxes for @sc{posix} basic and extended regular expressions. -The predefined syntaxes--taken directly from @file{regex.h}---are: +The predefined syntaxes---taken directly from @file{regex.h}---are: -@example +@smallexample #define RE_SYNTAX_EMACS 0 #define RE_SYNTAX_AWK \ @@ -332,7 +330,7 @@ The predefined syntaxes--taken directly from @file{regex.h}---are: | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \ | RE_NO_BK_PARENS | RE_NO_BK_REFS \ | RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD) -@end example +@end smallexample @node Collating Elements vs. Characters @section Collating Elements vs.@: Characters @@ -657,11 +655,11 @@ open-interval and close-interval operators; then: matches exactly @var{count} occurrences of the preceding regular expression. -@item @{@var{min,}@} +@item @{@var{min},@} matches @var{min} or more occurrences of the preceding regular expression. -@item @{@var{min, max}@} +@item @{@var{min}, @var{max}@} matches at least @var{min} but no more than @var{max} occurrences of the preceding regular expression. @@ -1222,8 +1220,9 @@ matches, e.g., @samp{foo} and, e.g., the first three characters of Its interaction with the syntax bits and pattern buffer fields is exactly the dual of @samp{^}'s; see the previous section. (That is, -``beginning'' becomes ``end'', ``next'' becomes ``previous'', and -``after'' becomes ``before''.) +``@samp{^}'' becomes ``@samp{$}'', ``beginning'' becomes ``end'', +``next'' becomes ``previous'', ``after'' becomes ``before'', and +``@code{not_bol}'' becomes ``@code{not_eol}''.) @node GNU Operators @@ -1568,10 +1567,9 @@ expression. To do either, you must first compile it in a pattern buffer @vindex re_syntax_options @r{initialization} Regular expressions match according to the syntax with which they were compiled; with @sc{gnu}, you indicate what syntax you want by setting -the variable @code{re_syntax_options} (declared in @file{regex.h} and -defined in @file{regex.c}) before calling the compiling function, -@code{re_compile_pattern} (see below). @xref{Syntax Bits}, and -@ref{Predefined Syntaxes}. +the variable @code{re_syntax_options} (declared in @file{regex.h}) +before calling the compiling function, @code{re_compile_pattern} (see +below). @xref{Syntax Bits}, and @ref{Predefined Syntaxes}. You can change the value of @code{re_syntax_options} at any time. Usually, however, you set its value once and then never change it.