PCRE2 C++ Wrapper 1.2.4
pcre2cpp
Loading...
Searching...
No Matches
pcre2cpp.hpp File Reference
#include <fmt/format.h>
#include <fmt/xchar.h>
#include <memory>
#include <mstd/mstd.hpp>
#include <pcre2.h>
#include <stdexcept>
#include <string>
#include <unordered_map>
#include <variant>
#include <vector>
#include <pcre2cpp/config.hpp>
#include <pcre2cpp/types.hpp>
#include <pcre2cpp/utils/pcre2_data.hpp>
#include <pcre2cpp/exceptions/exceptions.hpp>
#include <pcre2cpp/match/match_error_codes.hpp>
#include <pcre2cpp/match/match_options.hpp>
#include <pcre2cpp/match/match_result.hpp>
#include <pcre2cpp/regex/compile_options.hpp>

Go to the source code of this file.

Classes

struct  pcre2cpp::utils::pcre2_data< utf >
 Translation container from pcre2 library to pcre2cpp. More...
struct  pcre2cpp::utils::pcre2_data< utf_type::UTF_8 >
 Specialization of Translation container from pcre2 library to pcre2cpp for UTF-8. More...
struct  pcre2cpp::utils::pcre2_data< utf_type::UTF_16 >
 Specialization of Translation container from pcre2 library to pcre2cpp for UTF-16. More...
struct  pcre2cpp::utils::pcre2_data< utf_type::UTF_32 >
 Specialization of Translation container from pcre2 library to pcre2cpp for UTF-32. More...
struct  pcre2cpp::basic_match_value< utf >
 Match value container. More...
struct  pcre2cpp::sub_match_value
 Sub match value container. More...
class  pcre2cpp::basic_match_result< utf >
 Basic container to result data of match function. More...
class  pcre2cpp::basic_regex< utf >
 Basic PCRE2 Regex container. More...

Namespaces

namespace  pcre2cpp
 Main namespace of pcre2cpp library.
namespace  pcre2cpp::uitls
 Utility namespace of pcre2cpp library.
namespace  pcre2cpp::utils

Macros

#define _PCRE2CPP_CONFIG_HPP_
#define PCRE2CPP_VERSION_MAJOR   1
 pcre2cpp version major number
#define PCRE2CPP_VERSION_MINOR   2
 pcre2cpp version minor number
#define PCRE2CPP_VERSION_PATCH   4
 pcre2cpp version patch number
#define _PCRE2CPP_STRINGIFY_HELPER(x)
 stringify helper
#define _PCRE2CPP_VERSION_TO_STRING(major, minor, patch)
 converts version numbers to string
#define _PCRE2CPP_VERSION_TO_INT(major, minor, patch)
 converts version number to int
#define PCRE2CPP_VERSION_STRING    _PCRE2CPP_VERSION_TO_STRING(PCRE2CPP_VERSION_MAJOR, PCRE2CPP_VERSION_MINOR, PCRE2CPP_VERSION_PATCH)
 pcre2cpp version string
#define PCRE2CPP_VERSION_INT   _PCRE2CPP_VERSION_TO_INT(PCRE2CPP_VERSION_MAJOR, PCRE2CPP_VERSION_MINOR, PCRE2CPP_VERSION_PATCH)
 pcre2cpp version int
#define PCRE2CPP_VERSION   PCRE2CPP_VERSION_STRING
 pcre2cpp version string
#define PCRE2CPP_LAST_UPDATE_DAY   07
 pcre2cpp last update day
#define PCRE2CPP_LAST_UPDATE_MONTH   04
 pcre2cpp last update month
#define PCRE2CPP_LAST_UPDATE_YEAR   2026
 pcre2cpp last update year
#define _PCRE2CPP_LAST_UPDATE_DATE_HELPER(day, month, year)
 converts last update date to string
#define PCRE2CPP_LAST_UPDATE_DATE    _PCRE2CPP_LAST_UPDATE_DATE_HELPER(PCRE2CPP_LAST_UPDATE_DAY, PCRE2CPP_LAST_UPDATE_MONTH, PCRE2CPP_LAST_UPDATE_YEAR)
 pcre2cpp last update date string
#define _PCRE2CPP_HAS_CXX17   __cplusplus >= 201703l
 check if compiler has c++ version greater or equal to c++17
#define _PCRE2CPP_HAS_CXX20   0
 check if compiler has c++ version greater or equal to c++20 and if user enabled c++20 features using PCRE2CPP_ENABLE_CXX20
#define _PCRE2CPP_HAS_EXCEPTIONS   0
 check if exceptions are enabled
#define _PCRE2CPP_HAS_ASSERTS   _PCRE2CPP_HAS_CXX17
 check if asserts are enabled
#define _PCRE2CPP_NOEXCEPT
#define _PCRE2CPP_HAS_UTF8   1
 check if support for UTF-8 is enabled
#define PCRE2_CODE_UNIT_WIDTH   8
#define _PCRE2CPP_HAS_UTF16   1
 check if support for UTF-16 is enabled
#define PCRE2_CODE_UNIT_WIDTH   0
#define _PCRE2CPP_HAS_UTF32   1
 check if support for UTF-32 is enabled
#define PCRE2_CODE_UNIT_WIDTH   0
#define _PCRE2CPP_CONSTEXPR17
 constexpr for c++17 and higher
#define _PCRE2CPP_CONSTEXPR20
 constexpr keyword for c++20 and higher
#define _PCRE2CPP_REQUIRES(condition)
 requires keyword for c++20 and higher
#define _PCRE2CPP_MESSAGE(MESSAGE)
 compiler message
#define _PCRE2CPP_WARNING(MESSAGE)
 compiler warning
#define _PCRE2CPP_ERROR(MESSAGE)
 compiler error
#define _PCRE2CPP_LIBS_HPP_
#define _PCRE2CPP_TYPES_HPP_
#define _PCRE2CPP_PCRE2_DATA_HPP_
#define _PCRE2CPP_EXCEPTIONS_HPP_
#define _PCRE2CPP_REGEX_MATCH_OPTIONS_HPP_
#define _PCRE2CPP_MATCH_RESULT_HPP_
#define _PCRE2CPP_COMPILE_OPTIONS_HPP_
#define _PCRE2CPP_REGEX_HPP_
#define _PCRE2CPP_ASSERT_HPP_
#define pcre2cpp_assert(expression, ...)
 pcre2cpp assert
#define _PCRE2CPP_PCRE2CPP_HPP_

Typedefs

using pcre2cpp::utils::u8pcre2_data = pcre2_data<utf_type::UTF_8>
using pcre2cpp::utils::u16pcre2_data = pcre2_data<utf_type::UTF_16>
using pcre2cpp::utils::u32pcre2_data = pcre2_data<utf_type::UTF_32>
using pcre2cpp::match_options = mstd::flags<match_options_bits>
 Match options flags group.
using pcre2cpp::u8match_value = basic_match_value<utf_type::UTF_8>
using pcre2cpp::u16match_value = basic_match_value<utf_type::UTF_16>
using pcre2cpp::u32match_value = basic_match_value<utf_type::UTF_32>
using pcre2cpp::match_value = u8match_value
using pcre2cpp::u8match_result = basic_match_result<utf_type::UTF_8>
using pcre2cpp::u16match_result = basic_match_result<utf_type::UTF_16>
using pcre2cpp::u32match_result = basic_match_result<utf_type::UTF_32>
using pcre2cpp::match_result = u8match_result
using pcre2cpp::compile_options = mstd::flags<compile_options_bits>
 Compile options flags group.
using pcre2cpp::u8regex = basic_regex<utf_type::UTF_8>
using pcre2cpp::u16regex = basic_regex<utf_type::UTF_16>
using pcre2cpp::u32regex = basic_regex<utf_type::UTF_32>
using pcre2cpp::regex = u8regex

Enumerations

enum class  pcre2cpp::utf_type : uint8_t { pcre2cpp::utf_type::UTF_8 = 8 , pcre2cpp::utf_type::UTF_16 = 16 , pcre2cpp::utf_type::UTF_32 = 32 }
 Enum with supported utf types. More...
enum class  pcre2cpp::match_options_bits : uint32_t {
  pcre2cpp::match_options_bits::None = 0u , pcre2cpp::match_options_bits::Anchored = PCRE2_ANCHORED , pcre2cpp::match_options_bits::CopyMatchedSubject = PCRE2_COPY_MATCHED_SUBJECT , pcre2cpp::match_options_bits::DisableRecurseLoopCheck = PCRE2_DISABLE_RECURSELOOP_CHECK ,
  pcre2cpp::match_options_bits::EndAnchored = PCRE2_ENDANCHORED , pcre2cpp::match_options_bits::NotBOL = PCRE2_NOTBOL , pcre2cpp::match_options_bits::NotEOL = PCRE2_NOTEOL , pcre2cpp::match_options_bits::NotEmpty = PCRE2_NOTEMPTY ,
  pcre2cpp::match_options_bits::NotEmptyAtStart = PCRE2_NOTEMPTY_ATSTART , pcre2cpp::match_options_bits::NoJIT = PCRE2_NO_JIT , pcre2cpp::match_options_bits::NoUTFCheck = PCRE2_NO_UTF_CHECK , pcre2cpp::match_options_bits::PartialHard = PCRE2_PARTIAL_HARD ,
  pcre2cpp::match_options_bits::PartialSoft = PCRE2_PARTIAL_SOFT
}
 Match options. More...
enum class  pcre2cpp::compile_options_bits : uint32_t {
  pcre2cpp::compile_options_bits::None = 0u , pcre2cpp::compile_options_bits::Anchored = PCRE2_ANCHORED , pcre2cpp::compile_options_bits::AllowEmptyClass = PCRE2_ALLOW_EMPTY_CLASS , pcre2cpp::compile_options_bits::AltBSUX = PCRE2_ALT_BSUX ,
  pcre2cpp::compile_options_bits::AltCircumflex = PCRE2_ALT_CIRCUMFLEX , pcre2cpp::compile_options_bits::AltVerbNames = PCRE2_ALT_VERBNAMES , pcre2cpp::compile_options_bits::AutoCallout = PCRE2_AUTO_CALLOUT , pcre2cpp::compile_options_bits::Caseless = PCRE2_CASELESS ,
  pcre2cpp::compile_options_bits::DollarEndonly = PCRE2_DOLLAR_ENDONLY , pcre2cpp::compile_options_bits::DotAll = PCRE2_DOTALL , pcre2cpp::compile_options_bits::DupNames = PCRE2_DUPNAMES , pcre2cpp::compile_options_bits::EndAnchored = PCRE2_ENDANCHORED ,
  pcre2cpp::compile_options_bits::Extended = PCRE2_EXTENDED , pcre2cpp::compile_options_bits::FirstLine = PCRE2_FIRSTLINE , pcre2cpp::compile_options_bits::Literal = PCRE2_LITERAL , pcre2cpp::compile_options_bits::MatchInvalidUTF = PCRE2_MATCH_INVALID_UTF ,
  pcre2cpp::compile_options_bits::MatchUnsetBackRef = PCRE2_MATCH_UNSET_BACKREF , pcre2cpp::compile_options_bits::Multiline = PCRE2_MULTILINE , pcre2cpp::compile_options_bits::NeverBackslashC = PCRE2_NEVER_BACKSLASH_C , pcre2cpp::compile_options_bits::NeverUCP = PCRE2_NEVER_UCP ,
  pcre2cpp::compile_options_bits::NeverUTF = PCRE2_NEVER_UTF , pcre2cpp::compile_options_bits::NoAutoCapture = PCRE2_NO_AUTO_CAPTURE , pcre2cpp::compile_options_bits::NoAutoPossess = PCRE2_NO_AUTO_POSSESS , pcre2cpp::compile_options_bits::NoDotStarAnchor = PCRE2_NO_DOTSTAR_ANCHOR ,
  pcre2cpp::compile_options_bits::NoStartOptimize = PCRE2_NO_START_OPTIMIZE , pcre2cpp::compile_options_bits::NoUTFCheck = PCRE2_NO_UTF_CHECK , pcre2cpp::compile_options_bits::UCP = PCRE2_UCP , pcre2cpp::compile_options_bits::UnGreedy = PCRE2_UNGREEDY ,
  pcre2cpp::compile_options_bits::UseOffsetLimit = PCRE2_USE_OFFSET_LIMIT , pcre2cpp::compile_options_bits::UTF = PCRE2_UTF
}
 Compile options. More...

Macro Definition Documentation

◆ _PCRE2CPP_ASSERT_HPP_

#define _PCRE2CPP_ASSERT_HPP_

◆ _PCRE2CPP_COMPILE_OPTIONS_HPP_

#define _PCRE2CPP_COMPILE_OPTIONS_HPP_

◆ _PCRE2CPP_CONFIG_HPP_

#define _PCRE2CPP_CONFIG_HPP_

◆ _PCRE2CPP_EXCEPTIONS_HPP_

#define _PCRE2CPP_EXCEPTIONS_HPP_

◆ _PCRE2CPP_LIBS_HPP_

#define _PCRE2CPP_LIBS_HPP_

◆ _PCRE2CPP_MATCH_RESULT_HPP_

#define _PCRE2CPP_MATCH_RESULT_HPP_

◆ _PCRE2CPP_NOEXCEPT

#define _PCRE2CPP_NOEXCEPT

◆ _PCRE2CPP_PCRE2_DATA_HPP_

#define _PCRE2CPP_PCRE2_DATA_HPP_

◆ _PCRE2CPP_PCRE2CPP_HPP_

#define _PCRE2CPP_PCRE2CPP_HPP_

◆ _PCRE2CPP_REGEX_HPP_

#define _PCRE2CPP_REGEX_HPP_

◆ _PCRE2CPP_REGEX_MATCH_OPTIONS_HPP_

#define _PCRE2CPP_REGEX_MATCH_OPTIONS_HPP_

◆ _PCRE2CPP_TYPES_HPP_

#define _PCRE2CPP_TYPES_HPP_

◆ PCRE2_CODE_UNIT_WIDTH [1/3]

#define PCRE2_CODE_UNIT_WIDTH   0

◆ PCRE2_CODE_UNIT_WIDTH [2/3]

#define PCRE2_CODE_UNIT_WIDTH   0

◆ PCRE2_CODE_UNIT_WIDTH [3/3]

#define PCRE2_CODE_UNIT_WIDTH   8