userver: utils::Re2Replacement Struct Reference
Loading...
Searching...
No Matches
utils::Re2Replacement Struct Referencefinal

#include <userver/utils/regex.hpp>

Detailed Description

Replacement string with substitution support.

Warning
Avoid if at all possible, prefer using vanilla utils::regex_replace, as it is more portable
Allowing user-provided strings in replacement leads to injection vulnerabilities!

May contain the following special syntax:

  • \N (spelled as \\N in C++ string literals), where 0 <= N <= 9, can be used to insert capture groups;
  • In particular, \0 refers to the contents of the whole match;
  • Literal \ should be escaped as \\ (spelled as \\\\ in C++ string literals)
See also
utils::regex_replace

Definition at line 184 of file regex.hpp.

Public Attributes

std::string_view replacement
 

Member Data Documentation

◆ replacement

std::string_view utils::Re2Replacement::replacement

Definition at line 185 of file regex.hpp.


The documentation for this struct was generated from the following file: