Commit 7f0cf6fe authored by Nils Goroll's avatar Nils Goroll

documentation auto-update from vmodtool change

parent 3e08d60e
...@@ -6,8 +6,6 @@ ...@@ -6,8 +6,6 @@
.. role:: ref(emphasis) .. role:: ref(emphasis)
.. _vmod_re2(3):
======== ========
vmod_re2 vmod_re2
======== ========
...@@ -20,12 +18,6 @@ Varnish Module for access to the Google RE2 regular expression engine ...@@ -20,12 +18,6 @@ Varnish Module for access to the Google RE2 regular expression engine
SYNOPSIS SYNOPSIS
======== ========
...@@ -319,11 +311,10 @@ turned off. ...@@ -319,11 +311,10 @@ turned off.
just after a newline, and ``$`` also matches just before a newline. Default is just after a newline, and ``$`` also matches just before a newline. Default is
**false**. **false**.
.. _vmod_re2.regex:
.. _obj_regex: new xregex = re2.regex(STRING pattern, BOOL utf8, BOOL posix_syntax, BOOL longest_match, INT max_mem, BOOL literal, BOOL never_nl, BOOL dot_nl, BOOL never_capture, BOOL case_sensitive, BOOL perl_classes, BOOL word_boundary, BOOL one_line)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
regex(...)
----------
:: ::
...@@ -358,7 +349,7 @@ Example:: ...@@ -358,7 +349,7 @@ Example::
never_capture=true); never_capture=true);
} }
.. _func_regex.match: .. _vmod_re2.regex.match:
BOOL xregex.match(STRING) BOOL xregex.match(STRING)
------------------------- -------------------------
...@@ -372,8 +363,7 @@ Example:: ...@@ -372,8 +363,7 @@ Example::
call do_on_match; call do_on_match;
} }
.. _vmod_re2.regex.backref:
.. _func_regex.backref:
STRING xregex.backref(INT ref, STRING fallback) STRING xregex.backref(INT ref, STRING fallback)
----------------------------------------------- -----------------------------------------------
...@@ -440,8 +430,7 @@ Example:: ...@@ -440,8 +430,7 @@ Example::
set req.http.X-Domain = domainmatcher.backref(1); set req.http.X-Domain = domainmatcher.backref(1);
} }
.. _vmod_re2.regex.namedref:
.. _func_regex.namedref:
STRING xregex.namedref(STRING name, STRING fallback) STRING xregex.namedref(STRING name, STRING fallback)
---------------------------------------------------- ----------------------------------------------------
...@@ -498,11 +487,10 @@ Example:: ...@@ -498,11 +487,10 @@ Example::
} }
} }
.. _vmod_re2.regex.sub:
.. _func_regex.sub: STRING xregex.sub(STRING text, STRING rewrite, STRING fallback)
---------------------------------------------------------------
regex.sub(...)
--------------
:: ::
...@@ -540,11 +528,10 @@ Example:: ...@@ -540,11 +528,10 @@ Example::
set req.http.X-Yada = bmatcher.sub(req.http.Host, "d"); set req.http.X-Yada = bmatcher.sub(req.http.Host, "d");
} }
.. _vmod_re2.regex.suball:
.. _func_regex.suball: STRING xregex.suball(STRING text, STRING rewrite, STRING fallback)
------------------------------------------------------------------
regex.suball(...)
-----------------
:: ::
...@@ -577,11 +564,10 @@ Example:: ...@@ -577,11 +564,10 @@ Example::
set req.http.X-Yada = bmatcher.suball(req.http.Host, "d"); set req.http.X-Yada = bmatcher.suball(req.http.Host, "d");
} }
.. _vmod_re2.regex.extract:
.. _func_regex.extract: STRING xregex.extract(STRING text, STRING rewrite, STRING fallback)
-------------------------------------------------------------------
regex.extract(...)
------------------
:: ::
...@@ -612,8 +598,7 @@ Example:: ...@@ -612,8 +598,7 @@ Example::
set resp.http.X-UUCP = email.extract("boris@kremvax.ru", "\2!\1"); set resp.http.X-UUCP = email.extract("boris@kremvax.ru", "\2!\1");
} }
.. _vmod_re2.regex.cost:
.. _func_regex.cost:
INT xregex.cost() INT xregex.cost()
----------------- -----------------
...@@ -636,14 +621,10 @@ Example:: ...@@ -636,14 +621,10 @@ Example::
regex functional interface regex functional interface
========================== ==========================
.. _vmod_re2.match:
BOOL match(STRING pattern, STRING subject, BOOL utf8, BOOL posix_syntax, BOOL longest_match, INT max_mem, BOOL literal, BOOL never_nl, BOOL dot_nl, BOOL never_capture, BOOL case_sensitive, BOOL perl_classes, BOOL word_boundary, BOOL one_line)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
.. _func_match:
match(...)
----------
:: ::
...@@ -678,8 +659,7 @@ Example:: ...@@ -678,8 +659,7 @@ Example::
call do_on_match; call do_on_match;
} }
.. _vmod_re2.backref:
.. _func_backref:
STRING backref(INT ref, STRING fallback) STRING backref(INT ref, STRING fallback)
---------------------------------------- ----------------------------------------
...@@ -721,8 +701,7 @@ Example:: ...@@ -721,8 +701,7 @@ Example::
set beresp.http.X-Capture = re2.backref(1); set beresp.http.X-Capture = re2.backref(1);
} }
.. _vmod_re2.namedref:
.. _func_namedref:
STRING namedref(STRING name, STRING fallback) STRING namedref(STRING name, STRING fallback)
--------------------------------------------- ---------------------------------------------
...@@ -759,11 +738,10 @@ Example:: ...@@ -759,11 +738,10 @@ Example::
set beresp.http.X-Capture = re2.namedref("foo"); set beresp.http.X-Capture = re2.namedref("foo");
} }
.. _vmod_re2.sub:
.. _func_sub: STRING sub(STRING pattern, STRING text, STRING rewrite, STRING fallback, BOOL utf8, BOOL posix_syntax, BOOL longest_match, INT max_mem, BOOL literal, BOOL never_nl, BOOL dot_nl, BOOL never_capture, BOOL case_sensitive, BOOL perl_classes, BOOL word_boundary, BOOL one_line)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sub(...)
--------
:: ::
...@@ -810,11 +788,10 @@ Example:: ...@@ -810,11 +788,10 @@ Example::
set beresp.http.X-Yada = re2.sub(beresp.http.X-Sub-Letters, set beresp.http.X-Yada = re2.sub(beresp.http.X-Sub-Letters,
bereq.http.Host, "d"); bereq.http.Host, "d");
.. _vmod_re2.suball:
.. _func_suball: STRING suball(STRING pattern, STRING text, STRING rewrite, STRING fallback, BOOL utf8, BOOL posix_syntax, BOOL longest_match, INT max_mem, BOOL literal, BOOL never_nl, BOOL dot_nl, BOOL never_capture, BOOL case_sensitive, BOOL perl_classes, BOOL word_boundary, BOOL one_line)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
suball(...)
-----------
:: ::
...@@ -851,11 +828,10 @@ Example:: ...@@ -851,11 +828,10 @@ Example::
set beresp.http.X-Yada = re2.suball(beresp.http.X-Sub-Letters, set beresp.http.X-Yada = re2.suball(beresp.http.X-Sub-Letters,
bereq.http.Host, "d"); bereq.http.Host, "d");
.. _vmod_re2.extract:
.. _func_extract: STRING extract(STRING pattern, STRING text, STRING rewrite, STRING fallback, BOOL utf8, BOOL posix_syntax, BOOL longest_match, INT max_mem, BOOL literal, BOOL never_nl, BOOL dot_nl, BOOL never_capture, BOOL case_sensitive, BOOL perl_classes, BOOL word_boundary, BOOL one_line)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
extract(...)
------------
:: ::
...@@ -893,11 +869,10 @@ Example:: ...@@ -893,11 +869,10 @@ Example::
set beresp.http.X-Query = re2.extract(beresp.http.X-Params, bereq.url, set beresp.http.X-Query = re2.extract(beresp.http.X-Params, bereq.url,
"\1:\2"); "\1:\2");
.. _vmod_re2.cost:
.. _func_cost: INT cost(STRING pattern, BOOL utf8, BOOL posix_syntax, BOOL longest_match, INT max_mem, BOOL literal, BOOL never_nl, BOOL dot_nl, BOOL never_capture, BOOL case_sensitive, BOOL perl_classes, BOOL word_boundary, BOOL one_line)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cost(...)
---------
:: ::
...@@ -928,11 +903,10 @@ Example:: ...@@ -928,11 +903,10 @@ Example::
std.log("simple cost=" + re2.cost("simple") std.log("simple cost=" + re2.cost("simple")
+ " complex cost=" + re2.cost("complex{1,128}")); + " complex cost=" + re2.cost("complex{1,128}"));
.. _vmod_re2.set:
.. _obj_set: new xset = re2.set(ENUM anchor, BOOL utf8, BOOL posix_syntax, BOOL longest_match, INT max_mem, BOOL literal, BOOL never_nl, BOOL dot_nl, BOOL case_sensitive, BOOL perl_classes, BOOL word_boundary, BOOL one_line)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
set(...)
--------
:: ::
...@@ -991,10 +965,10 @@ Example:: ...@@ -991,10 +965,10 @@ Example::
perl_classes=true); perl_classes=true);
} }
.. _func_set.add: .. _vmod_re2.set.add:
set.add(...) VOID xset.add(STRING, STRING string, BACKEND backend, BOOL save, BOOL never_capture)
------------ ------------------------------------------------------------------------------------
:: ::
...@@ -1068,8 +1042,7 @@ Example:: ...@@ -1068,8 +1042,7 @@ Example::
# See the documentation of the .string() and .backend() methods # See the documentation of the .string() and .backend() methods
# below for uses of the parameters string and backend for .add(). # below for uses of the parameters string and backend for .add().
.. _vmod_re2.set.compile:
.. _func_set.compile:
VOID xset.compile() VOID xset.compile()
------------------- -------------------
...@@ -1090,8 +1063,7 @@ will fail. ...@@ -1090,8 +1063,7 @@ will fail.
See above for examples. See above for examples.
.. _vmod_re2.set.match:
.. _func_set.match:
BOOL xset.match(STRING) BOOL xset.match(STRING)
----------------------- -----------------------
...@@ -1125,8 +1097,7 @@ Example:: ...@@ -1125,8 +1097,7 @@ Example::
call do_when_a_host_matched; call do_when_a_host_matched;
} }
.. _vmod_re2.set.matched:
.. _func_set.matched:
BOOL xset.matched(INT) BOOL xset.matched(INT)
---------------------- ----------------------
...@@ -1170,8 +1141,7 @@ Example:: ...@@ -1170,8 +1141,7 @@ Example::
} }
} }
.. _vmod_re2.set.nmatches:
.. _func_set.nmatches:
INT xset.nmatches() INT xset.nmatches()
------------------- -------------------
...@@ -1196,8 +1166,7 @@ Example:: ...@@ -1196,8 +1166,7 @@ Example::
+ " patterns from the set"); + " patterns from the set");
} }
.. _vmod_re2.set.which:
.. _func_set.which:
INT xset.which(ENUM {FIRST, LAST, UNIQUE} select=UNIQUE) INT xset.which(ENUM {FIRST, LAST, UNIQUE} select=UNIQUE)
-------------------------------------------------------- --------------------------------------------------------
...@@ -1260,8 +1229,7 @@ Examples:: ...@@ -1260,8 +1229,7 @@ Examples::
# unsuccessful. # unsuccessful.
} }
.. _vmod_re2.set.string:
.. _func_set.string:
STRING xset.string(INT n, ENUM select) STRING xset.string(INT n, ENUM select)
-------------------------------------- --------------------------------------
...@@ -1397,8 +1365,7 @@ Examples:: ...@@ -1397,8 +1365,7 @@ Examples::
# vcl_synth is implemented as shown above # vcl_synth is implemented as shown above
.. _vmod_re2.set.backend:
.. _func_set.backend:
BACKEND xset.backend(INT n, ENUM select) BACKEND xset.backend(INT n, ENUM select)
---------------------------------------- ----------------------------------------
...@@ -1454,11 +1421,10 @@ Example:: ...@@ -1454,11 +1421,10 @@ Example::
} }
} }
.. _vmod_re2.set.sub:
.. _func_set.sub: STRING xset.sub(STRING text, STRING rewrite, STRING fallback, INT n, ENUM select)
---------------------------------------------------------------------------------
set.sub(...)
------------
:: ::
...@@ -1532,11 +1498,10 @@ Examples:: ...@@ -1532,11 +1498,10 @@ Examples::
} }
} }
.. _vmod_re2.set.suball:
.. _func_set.suball: STRING xset.suball(STRING text, STRING rewrite, STRING fallback, INT n, ENUM select)
------------------------------------------------------------------------------------
set.suball(...)
---------------
:: ::
...@@ -1589,11 +1554,10 @@ Example:: ...@@ -1589,11 +1554,10 @@ Example::
} }
} }
.. _vmod_re2.set.extract:
.. _func_set.extract: STRING xset.extract(STRING text, STRING rewrite, STRING fallback, INT n, ENUM select)
-------------------------------------------------------------------------------------
set.extract(...)
----------------
:: ::
...@@ -1646,8 +1610,7 @@ Example:: ...@@ -1646,8 +1610,7 @@ Example::
} }
} }
.. _vmod_re2.set.saved:
.. _func_set.saved:
BOOL xset.saved(ENUM which, INT n, ENUM select) BOOL xset.saved(ENUM which, INT n, ENUM select)
----------------------------------------------- -----------------------------------------------
...@@ -1721,11 +1684,7 @@ Example:: ...@@ -1721,11 +1684,7 @@ Example::
# and which=REGEX by default. # and which=REGEX by default.
} }
.. _vmod_re2.quotemeta:
.. _func_quotemeta:
STRING quotemeta(STRING, STRING fallback) STRING quotemeta(STRING, STRING fallback)
----------------------------------------- -----------------------------------------
...@@ -1753,8 +1712,7 @@ Example:: ...@@ -1753,8 +1712,7 @@ Example::
re2.quotemeta("1.5-2.0?") == "1\.5\-2\.0\?" re2.quotemeta("1.5-2.0?") == "1\.5\-2\.0\?"
re2.match(re2.quotemeta("1.5-2.0?"), "1.5-2.0?") re2.match(re2.quotemeta("1.5-2.0?"), "1.5-2.0?")
.. _vmod_re2.version:
.. _func_version:
STRING version() STRING version()
---------------- ----------------
...@@ -1830,7 +1788,6 @@ SEE ALSO ...@@ -1830,7 +1788,6 @@ SEE ALSO
* Series of articles motivating the design of RE2, with discussion * Series of articles motivating the design of RE2, with discussion
of how RE2 compares with PCRE of how RE2 compares with PCRE
COPYRIGHT COPYRIGHT
========= =========
......
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