From: Rich Bowen Date: Tue, 27 Jun 2006 10:56:59 +0000 (+0000) Subject: Regex stuff that was in 2.2 but not in trunk X-Git-Tag: 2.3.0~2305 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c5d6fe0c8995287a64525666d2f57d0ac944e712;p=thirdparty%2Fapache%2Fhttpd.git Regex stuff that was in 2.2 but not in trunk git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@417415 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/rewrite/rewrite_intro.html.en b/docs/manual/rewrite/rewrite_intro.html.en index 461caea6aff..f08e8c94fd7 100644 --- a/docs/manual/rewrite/rewrite_intro.html.en +++ b/docs/manual/rewrite/rewrite_intro.html.en @@ -37,8 +37,9 @@ but this doc should help the beginner get their feet wet.
  • .htaccess files
  • Environment Variables
  • See also

    +documentation
  • Technical details
  • Practical solutions to common +problems
  • Practical solutions to +advanced problems
  • top

    Introduction

    @@ -72,15 +73,46 @@ formulae, rather than magical incantations.

    Regex vocabulary

    The following are the minimal building blocks you will need, in order -to write regular expressions and RewriteRules.

    +to write regular expressions and RewriteRules. They certainly do not +represent a complete regular expression vocabulary, but they are a good +place to start, and should help you read basic regular expressions, as +well as write your own.

    + - + + + + + + + + + +
    Character MeaningExample
    .Matches any character
    .Matches any +characterc.t will match cat, +cot, cut, etc.
    +Repeats the previous match one or more +timesa+ matches a, aa, +aaa, etc
    *Repeats the previous match zero or more +times.a* matches all the same things +a+ matches, but will also match an empty string.
    ?Makes the match optional.
    .Matches any +charactercolou?r will match color and +colour.
    ^Called an anchor, matches the beginning +of the string^a matches a string that begins with +a
    $The other anchor, this matches the end of +the string.a$ matches a string that ends with +a.
    ( )Groups several characters into a single +unit, and captures a match for use in a backreference.(ab)+ +matches ababab - that is, the + applies to the group. +For more on backreferences see below.
    [ ]A character class - matches one of the +charactersc[uoa]t matches cut, +cot or cat.
    !NotNegates a match - that is, +ensures that it does not match.
    diff --git a/docs/manual/rewrite/rewrite_intro.xml b/docs/manual/rewrite/rewrite_intro.xml index a024acc58d2..7642bd9698c 100644 --- a/docs/manual/rewrite/rewrite_intro.xml +++ b/docs/manual/rewrite/rewrite_intro.xml @@ -37,9 +37,10 @@ but this doc should help the beginner get their feet wet. Module documentation Technical details -Rewrite Guide - useful examples -Advanced Rewrite Guide - -advanced useful examples +Practical solutions to common +problems +Practical solutions to +advanced problems
    Introduction

    The Apache module mod_rewrite is a very powerful and @@ -74,15 +75,46 @@ formulae, rather than magical incantations.

    The following are the minimal building blocks you will need, in order to write regular expressions and RewriteRules.

    +module="mod_rewrite">RewriteRules. They certainly do not +represent a complete regular expression vocabulary, but they are a good +place to start, and should help you read basic regular expressions, as +well as write your own.

    + - + + + + + + + + + +
    Character MeaningExample
    .Matches any character
    .Matches any +characterc.t will match cat, +cot, cut, etc.
    +Repeats the previous match one or more +timesa+ matches a, aa, +aaa, etc
    *Repeats the previous match zero or more +times.a* matches all the same things +a+ matches, but will also match an empty string.
    ?Makes the match optional.
    .Matches any +charactercolou?r will match color and +colour.
    ^Called an anchor, matches the beginning +of the string^a matches a string that begins with +a
    $The other anchor, this matches the end of +the string.a$ matches a string that ends with +a.
    ( )Groups several characters into a single +unit, and captures a match for use in a backreference.(ab)+ +matches ababab - that is, the + applies to the group. +For more on backreferences see below.
    [ ]A character class - matches one of the +charactersc[uoa]t matches cut, +cot or cat.
    !NotNegates a match - that is, +ensures that it does not match.