8#include <userver/utils/fast_pimpl.hpp>
10USERVER_NAMESPACE_BEGIN
22 explicit regex(std::string_view pattern);
27 regex(regex&&)
noexcept;
29 regex& operator=(
const regex&);
30 regex& operator=(regex&&)
noexcept;
32 bool operator==(
const regex&)
const;
34 std::string str()
const;
38 utils::FastPimpl<Impl, 16, 8> impl_;
40 friend class match_results;
41 friend bool regex_match(std::string_view str,
const regex& pattern);
42 friend bool regex_match(std::string_view str, match_results& m,
43 const regex& pattern);
44 friend bool regex_search(std::string_view str,
const regex& pattern);
46 const regex& pattern);
47 friend std::string
regex_replace(std::string_view str,
const regex& pattern,
48 std::string_view repl);
54class match_results
final {
60 match_results(
const match_results&);
62 match_results& operator=(
const match_results&);
64 std::size_t size()
const;
65 std::string_view operator[](
int sub)
const;
69 utils::FastPimpl<Impl, 80, 8> impl_;
71 friend bool regex_match(std::string_view str,
const regex& pattern);
72 friend bool regex_match(std::string_view str, match_results& m,
73 const regex& pattern);
74 friend bool regex_search(std::string_view str,
const regex& pattern);
76 const regex& pattern);
77 friend std::string
regex_replace(std::string_view str,
const regex& pattern,
78 std::string_view repl);
87bool regex_match(std::string_view str, match_results& m,
const regex& pattern);
91bool regex_search(std::string_view str, match_results& m,
const regex& pattern);
100 std::string_view repl);