A drop-in replacement for std::regex without huge includes and with better performance characteristics.
Definition in file regex.hpp.
Go to the source code of this file.
#include <cstddef>#include <exception>#include <string_view>#include <userver/utils/fast_pimpl.hpp>Classes | |
| class | utils::RegexError |
| Thrown from constructors of utils::regex with an invalid pattern. More... | |
| class | utils::regex |
A drop-in replacement for std::regex without huge includes and with better performance characteristics. More... | |
| class | utils::match_results |
A drop-in replacement for std::match_results without huge includes and with better performance characteristics. Represents capturing groups of a single match result. More... | |
| struct | utils::Re2Replacement |
| Replacement string with substitution support. More... | |
Namespaces | |
| namespace | utils |
| Utilities. | |
Functions | |
| bool | utils::regex_match (std::string_view str, const regex &pattern) |
| Determines whether the regular expression matches the entire target character sequence. | |
| bool | utils::regex_match (std::string_view str, match_results &m, const regex &pattern) |
| Returns true if the specified regular expression matches the whole of the input. Fills in what matched in m. | |
| bool | utils::regex_search (std::string_view str, const regex &pattern) |
| Determines whether the regular expression matches anywhere in the target character sequence. | |
| bool | utils::regex_search (std::string_view str, match_results &m, const regex &pattern) |
| Determines whether the regular expression matches anywhere in the target character sequence. Fills in what matched in m. | |
| std::string | utils::regex_replace (std::string_view str, const regex &pattern, std::string_view repl) |
| Create a new string where all regular expression matches replaced with repl. | |
| std::string | utils::regex_replace (std::string_view str, const regex &pattern, Re2Replacement repl) |