title: Regex patterns in Apache RewriteCond and friends: full or partial match?
body: <p>Apache documentation <a href="http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewritecond" rel="noreferrer">states</a> that </p>
  
  <blockquote>
    <p>CondPattern is the condition pattern,
    a regular expression which is applied
    to the current instance of the
    TestString [...] CondPattern is a perl
    compatible regular expression with
    some additions [...]</p>
  </blockquote>
  
  <p>And gives such examples as</p>
  
  <pre><code>RewriteCond %{REMOTE_HOST}  ^host1.*  [OR]
  </code></pre>
  
  <p>I know about Perl regular expressions, but this seems confusing to me:</p>
  
  <p>Are we speaking here of a <strong>partial match</strong>? (The pattern <strong>matches some substring</strong> inside the string, as in Perl <code>$string =~ m/pattern/;</code>?)  </p>
  
  <p>Or is rather it a <strong>full match</strong>? (The pattern <strong>matches the entire string</strong>, as in Java <code>Pattern.matches(pattern, string)</code>?)</p>
  
  <p>If the match is partial, the trailing <code>.*</code> seems redundant. It it's full, then it's the <code>^</code> what seems redundant.</p>
  
  <p>Many examples I've found, in the Apache docs and everywhere, have this (apparent to me) inconsistency.</p>
  
  <p><em>Update</em>: This was an issue with the docs, it's corrected now.</p>