]> granicus.if.org Git - apache/commitdiff
Make the RewriteRule docs shorter (!) by referencing the regex docs in the
authorJoshua Slive <slive@apache.org>
Wed, 12 Mar 2008 16:22:20 +0000 (16:22 +0000)
committerJoshua Slive <slive@apache.org>
Wed, 12 Mar 2008 16:22:20 +0000 (16:22 +0000)
rewrite intro.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@636398 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/mod_rewrite.html.en
docs/manual/mod/mod_rewrite.xml
docs/manual/rewrite/rewrite_intro.html.en
docs/manual/rewrite/rewrite_intro.xml

index 661c8c51f416a52c066f732998fe1a3db8012b2f..2a0d1a73ef36426f11cdec58e78e1535d455a397 100644 (file)
@@ -1086,50 +1086,10 @@ later</td></tr>
       <code>%{QUERY_STRING}</code> variables respectively.</p>
 </div>
 
-
-
-      <p>Some hints on the syntax of <a class="glossarylink" href="../glossary.html#regex" title="see glossary">regular 
-      expressions</a>:</p>
-
-<div class="note"><pre>
-<strong>Text:</strong>
-  <strong><code>.</code></strong>           Any single character
-  <strong><code>[</code></strong>chars<strong><code>]</code></strong>     Character class: Any character of the class ``chars''
-  <strong><code>[^</code></strong>chars<strong><code>]</code></strong>    Character class: Not a character of the class ``chars''
-  text1<strong><code>|</code></strong>text2 Alternative: text1 or text2
-
-<strong>Quantifiers:</strong>
-  <strong><code>?</code></strong>           0 or 1 occurrences of the preceding text
-  <strong><code>*</code></strong>           0 or N occurrences of the preceding text (N &gt; 0)
-  <strong><code>+</code></strong>           1 or N occurrences of the preceding text (N &gt; 1)
-
-<strong>Grouping:</strong>
-  <strong><code>(</code></strong>text<strong><code>)</code></strong>      Grouping of text
-              (used either to set the borders of an alternative as above, or
-              to make backreferences, where the <strong>N</strong>th group can 
-              be referred to on the RHS of a RewriteRule as <code>$</code><strong>N</strong>)
-
-<strong>Anchors:</strong>
-  <strong><code>^</code></strong>           Start-of-line anchor
-  <strong><code>$</code></strong>           End-of-line anchor
-
-<strong>Escaping:</strong>
-  <strong><code>\</code></strong>char       escape the given char
-              (for instance, to specify the chars "<code>.[]()</code>" <em>etc.</em>)
-</pre></div>
-
-      <p>For more information about regular expressions, have a look at the
-      perl regular expression manpage ("<a href="http://perldoc.perl.org/perlre.html">perldoc
-      perlre</a>"). If you are interested in more detailed
-      information about regular expressions and their variants
-      (POSIX regex etc.) the following book is dedicated to this topic:</p>
-
-      <p class="indent">
-        <em>Mastering Regular Expressions, 2nd Edition</em><br />
-         Jeffrey E.F. Friedl<br />
-         O'Reilly &amp; Associates, Inc. 2002<br />
-         ISBN 0-596-00289-0<br />
-      </p>
+      <p>For some hints on <a class="glossarylink" href="../glossary.html#regex" title="see glossary">regular
+      expressions</a>, see
+      the <a href="../rewrite/rewrite_intro.html#regex">mod_rewrite
+      Introduction</a>.</p>
 
       <p>In mod_rewrite, the NOT character     
        ('<code>!</code>') is also available as a possible pattern 
index 62234517a1851089b11f82cd8ee4feb8abc721a9..c68253f4a5b859232e7c47e09128efc4b4babc84 100644 (file)
@@ -1097,51 +1097,10 @@ RewriteRule  ^/$                 /homepage.std.html  [L]
       <code>%{QUERY_STRING}</code> variables respectively.</p>
 </note>
 
-
-
-      <p>Some hints on the syntax of <glossary ref="regex">regular 
-      expressions</glossary>:</p>
-
-<note><pre>
-<strong>Text:</strong>
-  <strong><code>.</code></strong>           Any single character
-  <strong><code>[</code></strong>chars<strong><code>]</code></strong>     Character class: Any character of the class ``chars''
-  <strong><code>[^</code></strong>chars<strong><code>]</code></strong>    Character class: Not a character of the class ``chars''
-  text1<strong><code>|</code></strong>text2 Alternative: text1 or text2
-
-<strong>Quantifiers:</strong>
-  <strong><code>?</code></strong>           0 or 1 occurrences of the preceding text
-  <strong><code>*</code></strong>           0 or N occurrences of the preceding text (N &gt; 0)
-  <strong><code>+</code></strong>           1 or N occurrences of the preceding text (N &gt; 1)
-
-<strong>Grouping:</strong>
-  <strong><code>(</code></strong>text<strong><code>)</code></strong>      Grouping of text
-              (used either to set the borders of an alternative as above, or
-              to make backreferences, where the <strong>N</strong>th group can 
-              be referred to on the RHS of a RewriteRule as <code>$</code><strong>N</strong>)
-
-<strong>Anchors:</strong>
-  <strong><code>^</code></strong>           Start-of-line anchor
-  <strong><code>$</code></strong>           End-of-line anchor
-
-<strong>Escaping:</strong>
-  <strong><code>\</code></strong>char       escape the given char
-              (for instance, to specify the chars "<code>.[]()</code>" <em>etc.</em>)
-</pre></note>
-
-      <p>For more information about regular expressions, have a look at the
-      perl regular expression manpage ("<a
-      href="http://perldoc.perl.org/perlre.html">perldoc
-      perlre</a>"). If you are interested in more detailed
-      information about regular expressions and their variants
-      (POSIX regex etc.) the following book is dedicated to this topic:</p>
-
-      <p class="indent">
-        <em>Mastering Regular Expressions, 2nd Edition</em><br />
-         Jeffrey E.F. Friedl<br />
-         O'Reilly &amp; Associates, Inc. 2002<br />
-         ISBN 0-596-00289-0<br />
-      </p>
+      <p>For some hints on <glossary ref="regex">regular
+      expressions</glossary>, see
+      the <a href="../rewrite/rewrite_intro.html#regex">mod_rewrite
+      Introduction</a>.</p>
 
       <p>In mod_rewrite, the NOT character     
        ('<code>!</code>') is also available as a possible pattern 
index 0fd0f0faa40edc97af6cf9d6f3df880cc38cc8b7..decc55a979e09a7b0131738f8cb4e11aea589407 100644 (file)
@@ -97,7 +97,7 @@ well as write your own.</p>
 <th>Example</th>
 </tr>
 
-<tr><td><code>.</code></td><td>Matches any
+<tr><td><code>.</code></td><td>Matches any single
 character</td><td><code>c.t</code> will match <code>cat</code>,
 <code>cot</code>, <code>cut</code>, etc.</td></tr>
 <tr><td><code>+</code></td><td>Repeats the previous match one or more
@@ -122,11 +122,14 @@ For more on backreferences see <a href="#InternalBackRefs">below</a>.</td></tr>
 <tr><td><code>[ ]</code></td><td>A character class - matches one of the
 characters</td><td><code>c[uoa]t</code> matches <code>cut</code>,
 <code>cot</code> or <code>cat</code>.</td></tr>
-<tr><td><code>!</code></td><td>Not</td><td>Negates a match - that is,
-ensures that it does not match.</td></tr>
-
+<tr><td><code>[^ ]</code></td><td>Negative character class - matches any character not specified</td><td><code>c[^/]t</code> matches <code>cat</code> or <code>c=t</code> but not <code>c/t</code></td></tr>
 </table>
 
+<p>In <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> the <code>!</code> character can be
+used before a regular expression to negate it. This is, a string will
+be considered to have matched only if it does not match the rest of
+the expression.</p>
+
 
 
 <h3><a name="InternalBackRefs" id="InternalBackRefs">Regex Back-Reference Availability</a></h3>
index 760759303e9e895479f8e0f0270ac1516a1de873..901a6e38e9539c843df7d48e4318ca472db8cb1f 100644 (file)
@@ -100,7 +100,7 @@ well as write your own.</p>
 <th>Example</th>
 </tr>
 
-<tr><td><code>.</code></td><td>Matches any
+<tr><td><code>.</code></td><td>Matches any single
 character</td><td><code>c.t</code> will match <code>cat</code>,
 <code>cot</code>, <code>cut</code>, etc.</td></tr>
 <tr><td><code>+</code></td><td>Repeats the previous match one or more
@@ -125,11 +125,14 @@ For more on backreferences see <a href="#InternalBackRefs">below</a>.</td></tr>
 <tr><td><code>[ ]</code></td><td>A character class - matches one of the
 characters</td><td><code>c[uoa]t</code> matches <code>cut</code>,
 <code>cot</code> or <code>cat</code>.</td></tr>
-<tr><td><code>!</code></td><td>Not</td><td>Negates a match - that is,
-ensures that it does not match.</td></tr>
-
+<tr><td><code>[^ ]</code></td><td>Negative character class - matches any character not specified</td><td><code>c[^/]t</code> matches <code>cat</code> or <code>c=t</code> but not <code>c/t</code></td></tr>
 </table>
 
+<p>In <module>mod_rewrite</module> the <code>!</code> character can be
+used before a regular expression to negate it. This is, a string will
+be considered to have matched only if it does not match the rest of
+the expression.</p>
+
 </section>
 
 <section id="InternalBackRefs"><title>Regex Back-Reference Availability</title>