PCRE2 C++ Wrapper 1.3.0
pcre2cpp
Loading...
Searching...
No Matches
match_options.hpp
1/*
2 * pcre2cpp - PCRE2 cpp wrapper
3 *
4 * Licensed under the BSD 3-Clause License with Attribution Requirement.
5 * See the LICENSE file for details: https://github.com/MAIPA01/pcre2cpp/blob/main/LICENSE
6 *
7 * Copyright (c) 2025, Patryk Antosik (MAIPA01)
8 *
9 * PCRE2 library included in this project:
10 * Copyright (c) 2016-2024, University of Cambridge.
11 *
12 * See the LICENSE_PCRE2 file for details: https://github.com/MAIPA01/pcre2cpp/blob/main/LICENSE_PCRE2
13 */
14#pragma once
15#ifndef _PCRE2CPP_REGEX_MATCH_OPTIONS_HPP_
16 #define _PCRE2CPP_REGEX_MATCH_OPTIONS_HPP_
17
18 #include <pcre2cpp/config.hpp>
19
21_PCRE2CPP_ERROR("This is only available for c++17 and greater!");
22 #else
23
24 #include <pcre2cpp/types.hpp>
25
26namespace pcre2cpp {
27 /**
28 * @brief Match options
29 * @ingroup pcre2cpp
30 */
32 /// @brief No options set (default)
33 None = 0u,
34 /// @brief Match only at the first position
36 /// @brief On success, make a private subject copy
38 /// @brief Only useful in rare cases; use with care
40 /// @brief Pattern can match only at end of subject
42 /// @brief Subject string is not the beginning of a line
44 /// @brief Subject string is not the end of a line
46 /// @brief An empty string is not a valid match
48 /// @brief An empty string at the start of the subject is not a valid match
50 /// @brief Do not use JIT matching
52 /// @brief Do not check the subject for UTF validity(only relevant if compile_options::UTF was set at compile time)
54 /// @brief Return match_error_codes::Partial for a partial match even if there is a full match
56 /// @brief Return match_error_codes::Partial for a partial match if no full matches are found
58 };
59
60 /**
61 * @brief Match options flags group
62 * @ingroup pcre2cpp
63 */
65
66 /**
67 * @brief operator for combining match options to one flags group
68 * @ingroup pcre2cpp
69 * @param opt0 first match option
70 * @param opt1 second match option
71 * @return Match options flags group created from two match options
72 */
74 return mstd::operator|(opt0, opt1);
75 }
76} // namespace pcre2cpp
77 #endif
78#endif
base pcre2cpp exception class
Definition exceptions.hpp:134
static _PCRE2CPP_CONSTEXPR17 match_options operator|(const match_options_bits opt0, const match_options_bits opt1) noexcept
operator for combining match options to one flags group
Definition match_options.hpp:73
match_options_bits
Match options.
Definition match_options.hpp:31
@ NotEOL
Subject string is not the end of a line.
Definition match_options.hpp:45
@ PartialHard
Return match_error_codes::Partial for a partial match even if there is a full match.
Definition match_options.hpp:55
@ NotBOL
Subject string is not the beginning of a line.
Definition match_options.hpp:43
@ NotEmpty
An empty string is not a valid match.
Definition match_options.hpp:47
@ PartialSoft
Return match_error_codes::Partial for a partial match if no full matches are found.
Definition match_options.hpp:57
@ None
No options set (default).
Definition match_options.hpp:33
@ CopyMatchedSubject
On success, make a private subject copy.
Definition match_options.hpp:37
@ NoUTFCheck
Do not check the subject for UTF validity(only relevant if compile_options::UTF was set at compile ti...
Definition match_options.hpp:53
@ Anchored
Match only at the first position.
Definition match_options.hpp:35
@ NotEmptyAtStart
An empty string at the start of the subject is not a valid match.
Definition match_options.hpp:49
@ EndAnchored
Pattern can match only at end of subject.
Definition match_options.hpp:41
@ DisableRecurseLoopCheck
Only useful in rare cases; use with care.
Definition match_options.hpp:39
@ NoJIT
Do not use JIT matching.
Definition match_options.hpp:51
#define _PCRE2CPP_CONSTEXPR17
constexpr for c++17 and higher
Definition config.hpp:236
#define _PCRE2CPP_HAS_CXX17
check if compiler has c++ version greater or equal to c++17
Definition config.hpp:133