</Location>
</code></p></div>
+ <p>Backreferences can be used in the comparison and in the substituion,
+ when regular expressions are used, as illustrated in the following example: </p>
+ <div class="example"><h3>Example of using backreferences and captures</h3><p><code>
+ <Location />
+ <span class="indent">
+ AddOutputFilterByType SUBSTITUTE text/html<br />
+ # "foo=k,bar=k" -> "foo/bar=k" <br />
+ Substitute "s|foo=(\w+),bar=\1|foo/bar=$1"
+ </span>
+ </Location>
+ </code></p></div>
+
<p>A common use scenario for <code>mod_substitute</code> is the
situation in which a front-end server proxies requests to a back-end
server which returns HTML with hard-coded embedded URLs that refer
</Location>
</example>
+ <p>Backreferences can be used in the comparison and in the substituion,
+ when regular expressions are used, as illustrated in the following example: </p>
+ <example><title>Example of using backreferences and captures</title>
+ <Location />
+ <indent>
+ AddOutputFilterByType SUBSTITUTE text/html<br />
+ # "foo=k,bar=k" -> "foo/bar=k" <br />
+ Substitute "s|foo=(\w+),bar=\1|foo/bar=$1"
+ </indent>
+ </Location>
+ </example>
+
<p>A common use scenario for <code>mod_substitute</code> is the
situation in which a front-end server proxies requests to a back-end
server which returns HTML with hard-coded embedded URLs that refer