Link to varnish-cache documentation for regsub(all)?

parent b744681c
......@@ -33,13 +33,17 @@ SYNOPSIS
DESCRIPTION
===========
.. _regsub(): https://varnish-cache.org/docs/trunk/reference/vcl.html#regsub-str-regex-sub
.. _regsuball(): https://varnish-cache.org/docs/trunk/reference/vcl.html#regsuball-str-regex-sub
Varnish Module (VMOD) for matching strings against regular expressions,
and for extracting captured substrings after matches.
Regular expression matching as implemented by the VMOD is equivalent
to VCL's infix operator ``~``. The VMOD is motivated by the fact that
backreference capture in standard VCL requires verbose and suboptimal
use of the ``regsub`` or ``regsuball`` functions. For example, this
use of the `regsub()`_ or `regsuball()`_ functions. For example, this
common idiom in VCL captures a string of digits following the
substring ``"bar"`` from one request header into another::
......@@ -219,7 +223,7 @@ Description
scope (client or backend context), or a fallback string in
case the extraction fails. Backref 0 indicates the entire
matched string. Thus this function behaves like the ``\n``
symbols in ``regsub`` and ``regsuball``, and the ``$1``,
symbols in `regsub()`_ and `regsuball()`_, and the ``$1``,
``$2`` ... variables in Perl.
After unsuccessful matches, the ``fallback`` string is returned
......@@ -227,7 +231,7 @@ Description
is ``"**BACKREF METHOD FAILED**"``.
The VCL infix operators ``~`` and ``!~`` do not affect this
method, nor do the functions ``regsub`` or ``regsuball``.
method, nor do the functions `regsub()`_ or `regsuball()`_.
If ``backref`` is called without any prior call to ``match``
for this object in the same task scope, then an error message
......
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