Commit ff49a7b9 authored by Per Andreas Buer's avatar Per Andreas Buer

On regular expressions in VCL

git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@5642 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 2a2b0a8f
...@@ -8,8 +8,9 @@ Varnish is a state of the art web accelerator. Its mission is to sit ...@@ -8,8 +8,9 @@ Varnish is a state of the art web accelerator. Its mission is to sit
in front of a web server an cache the content. It makes your web site in front of a web server an cache the content. It makes your web site
go fast. go fast.
We suggest you start by reading the :ref:`install-index`. Once you We suggest you start by reading the installation guide
have Varnish up and running go through the :ref:`tutorial-index`. :ref:`install-index`. Once you have Varnish up and running go through
our tutorial - :ref:`tutorial-index`.
Contents: Contents:
......
...@@ -288,6 +288,22 @@ To match an IP address against an ACL, simply use the match operator::: ...@@ -288,6 +288,22 @@ To match an IP address against an ACL, simply use the match operator:::
return (pipe); return (pipe);
} }
Regular Expressions
-------------------
In Varnish 2.1.0 Varnish switched to using PCRE - Perl-compatible
regular expressions. For a complete description of PCRE please see the
PCRE(3) man page.
To send flags to the PCRE engine, such as to turn on *case
insensitivity* add the flag within parens following a question mark,
like this:::
if (req.http.host ~ "(?i)example.com$") {
...
}
Functions Functions
--------- ---------
......
Markdown is supported
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