Class RegexRewrite (0.12.1)

RegexRewrite(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The spec for modifying the path using a regular expression.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

Attributes

Name Description
path_pattern str
The regular expression used to match against the URL path. It uses RE2 syntax with the following constraints: :: - Any single character operators - Groups are allowed to have only submatch operator inside - Groups are allowed only without any char repetition, e.g. .* - Any char repetition, e.g. .*, is only allowed to be used in a single regex together with: - Empty string operators - Other repetitions - Ranges - Repetitions of ranges - Ranges are only allowed to have: - Character range - Digits range - Symbols listed in characters allowed for ranges This field is a member of oneof_ _path_pattern.
path_substitution str
Required when path pattern is specified. Used to rewrite matching parts of the path. This field is a member of oneof_ _path_substitution.