Commit 54f6cf0b authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Clarify which kinds of regexs are used.

parent e6a12272
......@@ -338,8 +338,8 @@ server will possibly enforce additional restrictions to "foo".
.SH REWRITING
A string is rewritten according to a set of rules, called a `rewrite
context'.
The rules are based on Regular Expressions (POSIX regex) with
substring matching; basic variable substitution and map resolution
The rules are based on POSIX (''extended'') regular expressions (regex)
with substring matching; basic variable substitution and map resolution
of substrings is allowed by specific mechanisms detailed in the following.
The behavior of pattern matching/substitution can be altered by a set
of flags.
......@@ -365,7 +365,7 @@ alter the action that is taken after substitution.
honors case in matching (default is case insensitive)
.TP
.B `R'
use POSIX Basic Regular Expressions (default is Extended)
use POSIX ''basic'' regular expressions (default is ''extended'')
.TP
.B `M{n}'
allow no more than
......@@ -422,15 +422,16 @@ errors, but jump two lines ahead only in case of match.
More flags (mainly Action Flags) will be added as needed.
.SH "Pattern matching:"
See
.BR regex (7).
.BR regex (7)
and/or
.BR re_format (7).
.SH "Substitution Pattern Syntax:"
Everything starting with `%' requires substitution;
.LP
the only obvious exception is `%%', which is left as is;
.LP
the basic substitution is `%d', where `d' is a digit;
0 means the whole string, while 1-9 is a submatch, as discussed in
.BR regex (7);
0 means the whole string, while 1-9 is a submatch;
.LP
a `%' followed by a `{' invokes an advanced substitution.
The pattern is:
......@@ -496,10 +497,8 @@ directive.
Substitution escaping has been delegated to the `%' symbol,
which is used instead of `\e' in string substitution patterns
because `\e' is already escaped by slapd's low level parsing routines;
as a consequence,
.BR regex (7)
escaping requires two `\e' symbols, e.g. `\fB.*\e.foo\e.bar\fP' must
be written as `\fB.*\e\e.foo\e\e.bar\fP'.
as a consequence, regex escaping requires two `\e' symbols,
e.g. `\fB.*\e.foo\e.bar\fP' must be written as `\fB.*\e\e.foo\e\e.bar\fP'.
.\"
.\" The symbol can be altered at will by redefining the related macro in
.\" "rewrite-int.h".
......@@ -753,6 +752,7 @@ default slapd configuration file
.BR slapd\-ldap (5),
.BR slapo\-pcache (5),
.BR slapd (8),
.BR regex (7).
.BR regex (7),
.BR re_format (7).
.SH AUTHOR
Pierangelo Masarati, based on back-ldap by Howard Chu
......@@ -142,11 +142,13 @@ qualifier is
.BR regex ,
then
.B <dnpattern>
is a regular expression pattern,
is a POSIX (''extended'') regular expression pattern,
as detailed in
.BR regex (7),
.BR regex (7)
and/or
.BR re_format (7),
matching a normalized string representation of the entry's DN.
The regex form of the pattern does not (yet) support UTF-8.
The regex form of the pattern does not (yet) support UTF\-8.
.LP
The statement
.B filter=<ldapfilter>
......@@ -194,8 +196,8 @@ value. If the value
.B <style>
is
.BR regex ,
the provided value is used as a regular expression pattern.
If the attribute has DN syntax, the value
the provided value is used as a POSIX (''extended'') regular
expression pattern. If the attribute has DN syntax, the value
.B <style>
can be any of
.BR base ,
......@@ -415,14 +417,18 @@ which means that
.B <group>
will be expanded as a replacement string (but not as a regular expression)
according to
.BR regex (7),
.BR regex (7)
and/or
.BR re_format (7),
and
.BR exact ,
which means that exact match will be used.
If the style of the DN portion of the
.B <what>
clause is regex, the submatches are made available according to
.BR regex (7);
.BR regex (7)
and/or
.BR re_format (7);
other styles provide limited submatches as discussed above about
the DN form of the
.B <by>
......@@ -468,9 +474,7 @@ case apply, plus the
.B regex
style, which implies submatch
.B expand
and
.BR regex (7)
match of the corresponding connection parameters.
and regex match of the corresponding connection parameters.
The
.B exact
style of the
......@@ -907,6 +911,8 @@ default slapd configuration file
.SH SEE ALSO
.BR slapd (8),
.BR slapacl (8),
.BR regex (7),
.BR re_format (7)
.LP
"OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
.SH ACKNOWLEDGEMENTS
......
......@@ -253,10 +253,13 @@ for exact, onelevel, children and subtree matches, which cause
.I <pattern>
to be normalized according to the DN normalization rules, or the special
.I regex
style, which causes
style, which causes the
.I <pattern>
to be compiled according to
.BR regex (7).
to be treated as a POSIX (''extended'') regular expression, as
discussed in
.BR regex (7)
and/or
.BR re_format (7).
A pattern of
.I *
means any non-anonymous DN.
......@@ -326,8 +329,8 @@ are taken, when available, and combined into a name of the form
.RE
This name is then compared against the
.B match
regular expression, and if the match is successful, the name is
replaced with the
POSIX (''extended'') regular expression, and if the match is successful,
the name is replaced with the
.B replace
string. If there are wildcard strings in the
.B match
......@@ -1090,9 +1093,8 @@ to allow any level of depth match, including the exact match; with
.BR children ,
to allow any level of depth match, not including the exact match;
.BR regex
explicitly requires the (default) match based on regular expression
pattern, as detailed in
.BR regex (7).
explicitly requires the (default) match based on POSIX (''extended'')
regular expression pattern.
Finally,
.B anonymous
matches unbound operations; the
......
......@@ -110,8 +110,7 @@ default slapd configuration file
.BR slapd\-ldap (5),
.BR slapd\-meta (5),
.BR slapd\-sql (5),
.BR slapd (8),
.BR regex (7).
.BR slapd (8).
.SH AUTHOR
Originally implemented by Apurva Kumar as an extension to back-meta;
turned into an overlay by Howard Chu.
......@@ -86,7 +86,7 @@ See the REWRITING section for details.
.SH REWRITING
A string is rewritten according to a set of rules, called a `rewrite
context'.
The rules are based on Regular Expressions (POSIX regex) with
The rules are based on POSIX (''extended'') regular expressions with
substring matching; basic variable substitution and map resolution
of substrings is allowed by specific mechanisms detailed in the following.
The behavior of pattern matching/substitution can be altered by a set
......@@ -132,7 +132,7 @@ alter the actions that are taken after substitution.
honors case in matching (default is case insensitive)
.TP
.B `R'
use POSIX Basic Regular Expressions (default is Extended)
use POSIX ''basic'' regular expressions (default is ''extended'')
.TP
.B `M{n}'
allow no more than
......@@ -189,7 +189,9 @@ errors, but jump two lines ahead only in case of match.
More flags (mainly Action Flags) will be added as needed.
.SH "Pattern Matching"
See
.BR regex (7).
.BR regex (7)
and/or
.BR re_format (7).
.SH "Substitution Pattern Syntax"
Everything starting with `$' requires substitution;
.LP
......@@ -197,7 +199,9 @@ the only obvious exception is `$$', which is left as is;
.LP
the basic substitution is `$<d>', where `<d>' is a digit;
0 means the whole string, while 1-9 is a submatch, as discussed in
.BR regex (7);
.BR regex (7)
and/or
.BR re_format (7).
.LP
a `$' followed by a `{' invokes an advanced substitution.
The pattern is:
......@@ -263,9 +267,8 @@ directive.
Substitution escaping has been delegated to the `$' symbol,
which is used instead of `\e' in string substitution patterns
because `\e' is already escaped by slapd's low level parsing routines;
as a consequence,
.BR regex (7)
escaping requires two `\e' symbols, e.g. `\fB.*\e.foo\e.bar\fP' must
as a consequence, regex escaping requires
two `\e' symbols, e.g. `\fB.*\e.foo\e.bar\fP' must
be written as `\fB.*\e\e.foo\e\e.bar\fP'.
.\"
.\" The symbol can be altered at will by redefining the related macro in
......@@ -506,7 +509,8 @@ default slapd configuration file
.BR slapd\-meta (5),
.BR slapd\-relay (5),
.BR slapd (8),
.BR regex (7).
.BR regex (7),
.BR re_format (7).
.SH AUTHOR
Pierangelo Masarati; based on back-ldap rewrite/remap features
by Howard Chu, Pierangelo Masarati.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment