PCRE2 C++ Wrapper 1.2.4
pcre2cpp
Loading...
Searching...
No Matches
match_result.hpp
Go to the documentation of this file.
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
15#pragma once
16#ifndef _PCRE2CPP_MATCH_RESULT_HPP_
17 #define _PCRE2CPP_MATCH_RESULT_HPP_
18
19 #include <pcre2cpp/config.hpp>
20
21 #if !_PCRE2CPP_HAS_CXX17
22_PCRE2CPP_ERROR("This is only available for c++17 and greater!");
23 #else
24
27 #include <pcre2cpp/types.hpp>
29
30namespace pcre2cpp {
31 #pragma region MATCH_VALUE
32
38 template<utf_type utf>
39 struct basic_match_value {
40 private:
41 using _string_type = typename utils::pcre2_data<utf>::string_type;
42
43 public:
45 size_t relative_offset;
47 _string_type value;
48 };
49
50 #if _PCRE2CPP_HAS_UTF8
52 #endif
53 #if _PCRE2CPP_HAS_UTF16
55 #endif
56 #if _PCRE2CPP_HAS_UTF32
58 #endif
59
60 #if _PCRE2CPP_HAS_UTF8
62 #elif _PCRE2CPP_HAS_UTF16
64 #elif _PCRE2CPP_HAS_UTF32
66 #endif
67 #pragma endregion
68
69 #pragma region SUB_MATCH_VALUE
70
75 struct sub_match_value {
77 size_t relative_offset;
79 size_t size;
80 };
81
82 #pragma endregion
83
89 template<utf_type utf>
90 class basic_match_result {
91 public:
93 static _PCRE2CPP_CONSTEXPR17 size_t bad_offset = std::numeric_limits<size_t>::max();
94
95 private:
96 using _pcre2_data_t = utils::pcre2_data<utf>;
97 using _string_type = typename _pcre2_data_t::string_type;
98 using _string_view_type = typename _pcre2_data_t::string_view_type;
99 using _match_value = basic_match_value<utf>;
100 #if _PCRE2CPP_HAS_EXCEPTIONS
101 using _match_result_exception = basic_match_result_exception<utf>;
102 #endif
103 using _named_sub_values_table = std::unordered_map<_string_type, size_t>;
104 using _named_sub_values_table_ptr = std::shared_ptr<_named_sub_values_table>;
105
107 struct _value_result_data {
108 size_t search_offset = bad_offset;
109 _match_value result = { bad_offset, _string_type() };
110 std::vector<std::optional<sub_match_value> > sub_results = {};
111 _named_sub_values_table_ptr named_sub_values = {};
112 bool found = false;
113 };
114
116 std::variant<match_error_codes, _value_result_data> _data = _value_result_data();
117
119 static _PCRE2CPP_CONSTEXPR17 _string_type _get_out_of_bounds_string() noexcept {
120 #if _PCRE2CPP_HAS_UTF8
121 if _PCRE2CPP_CONSTEXPR17 (utf == utf_type::UTF_8) { return "Subexpression index out of bounds or has no value"; }
122 else
123 #endif
124 #if _PCRE2CPP_HAS_UTF16
126 return u"Subexpression index out of bounds or has no value";
127 }
128 else
129 #endif
130 #if _PCRE2CPP_HAS_UTF32
132 return U"Subexpression index out of bounds or has no value";
133 }
134 else
135 #endif
136 {
137 return _string_type();
138 }
139 }
140
142 static _PCRE2CPP_CONSTEXPR17 _string_type _get_subexpression_not_found(const _string_view_type name) noexcept {
143 #if _PCRE2CPP_HAS_UTF8
145 return fmt::format("Subexpression with provided name '{}' not found", name);
146 }
147 else
148 #endif
149 #if _PCRE2CPP_HAS_UTF16
151 return fmt::format(u"Subexpression with provided name '{}' not found", name);
152 }
153 else
154 #endif
155 #if _PCRE2CPP_HAS_UTF32
157 return fmt::format(U"Subexpression with provided name '{}' not found", name);
158 }
159 else
160 #endif
161 {
162 return _string_type();
163 }
164 }
165
167 _PCRE2CPP_CONSTEXPR17 bool _has_named_sub_result(const _string_view_type name) const noexcept {
168 const auto& named_sub_values = std::get<_value_result_data>(_data).named_sub_values;
169 #if _PCRE2CPP_HAS_CXX20
170 return named_sub_values->contains(name.data());
171 #else
172 return named_sub_values->find(name.data()) != named_sub_values->end();
173 #endif
174 }
175
177 _PCRE2CPP_CONSTEXPR17 bool _has_sub_value(const size_t idx) const noexcept {
178 const auto& subResults = std::get<_value_result_data>(_data).sub_results;
179 return idx < subResults.size() && subResults[idx].has_value();
180 }
181
183 _PCRE2CPP_CONSTEXPR17 size_t _get_named_sub_result_idx(const _string_view_type name) const _PCRE2CPP_NOEXCEPT {
184 if (!_has_named_sub_result(name)) {
185 #if _PCRE2CPP_HAS_EXCEPTIONS
186 throw _match_result_exception(_get_subexpression_not_found(name));
187 #else
188 pcre2cpp_assert(false, "{}", _get_subexpression_not_found(name));
189 return bad_offset;
190 #endif
191 }
192 return std::get<_value_result_data>(_data).named_sub_values->at(name.data());
193 }
194
196 _PCRE2CPP_CONSTEXPR17 sub_match_value _get_sub_value(const size_t idx) const _PCRE2CPP_NOEXCEPT {
197 if (!_has_sub_value(idx)) {
198 #if _PCRE2CPP_HAS_EXCEPTIONS
199 throw basic_match_result_exception<utf>(_get_out_of_bounds_string());
200 #else
201 pcre2cpp_assert(false, "{}", _get_out_of_bounds_string());
202 return { .relative_offset = bad_offset, .size = 0 };
203 #endif
204 }
205
206 return std::get<_value_result_data>(_data).sub_results[idx].value();
207 }
208
209 public:
210 #pragma region CONSTRUCTORS
212 _PCRE2CPP_CONSTEXPR17 basic_match_result() noexcept = default;
213
215 _PCRE2CPP_CONSTEXPR17 explicit basic_match_result(const match_error_codes error_code) noexcept : _data(error_code) {}
216
218 _PCRE2CPP_CONSTEXPR17 basic_match_result(const size_t search_offset,
219 const _named_sub_values_table_ptr& named_sub_values) noexcept
220 : _data(_value_result_data { .search_offset = search_offset, .named_sub_values = named_sub_values }) {}
221
223 _PCRE2CPP_CONSTEXPR17 basic_match_result(const size_t search_offset, const _match_value& result,
224 const std::vector<std::optional<sub_match_value> >& sub_results,
225 const _named_sub_values_table_ptr& named_sub_values) noexcept
226 : _data(_value_result_data { .search_offset = search_offset,
227 .result = result,
228 .sub_results = sub_results,
229 .named_sub_values = named_sub_values,
230 .found = true }) {}
231
233 _PCRE2CPP_CONSTEXPR17 basic_match_result(const basic_match_result& other) noexcept = default;
236 #pragma endregion
237
239 _PCRE2CPP_CONSTEXPR20 ~basic_match_result() noexcept = default;
240
242 _PCRE2CPP_CONSTEXPR17 basic_match_result& operator=(const basic_match_result& other) noexcept = default;
244 _PCRE2CPP_CONSTEXPR17 basic_match_result& operator=(basic_match_result&& other) noexcept = default;
245
246 #pragma region ERRORS
247
249 _PCRE2CPP_CONSTEXPR17 bool has_error() const noexcept { return std::holds_alternative<match_error_codes>(_data); }
250
252 _PCRE2CPP_CONSTEXPR17 match_error_codes get_error_code() const noexcept {
253 if (!has_error()) { return match_error_codes::None; }
254 return std::get<match_error_codes>(_data);
255 }
256
258 _PCRE2CPP_CONSTEXPR17 _string_type get_error_message() const noexcept {
259 if (!has_error()) { return _string_type(); }
260 return pcre2cpp::generate_error_message<utf>(static_cast<int>(std::get<match_error_codes>(_data)));
261 }
262
263 #if _PCRE2CPP_HAS_EXCEPTIONS
265 _PCRE2CPP_CONSTEXPR17 void throw_error() const {
266 if (!has_error()) { return; }
267 throw _match_result_exception(static_cast<int>(std::get<match_error_codes>(_data)));
268 }
269 #endif
270
271 #pragma endregion ERRORS
272
273 #pragma region RESULTS
274
276 _PCRE2CPP_CONSTEXPR17 bool has_result() const noexcept { return std::holds_alternative<_value_result_data>(_data); }
277
279 _PCRE2CPP_CONSTEXPR17 bool has_value() const noexcept {
280 if (!has_result()) { return false; }
281 return std::get<_value_result_data>(_data).found;
282 }
283
285 _PCRE2CPP_CONSTEXPR17 bool has_sub_value(const size_t idx) const noexcept {
286 if (!has_value()) { return false; }
287 return _has_sub_value(idx);
288 }
289
291 _PCRE2CPP_CONSTEXPR17 bool has_sub_value(const _string_view_type name) const noexcept {
292 return _has_named_sub_result(name) && has_sub_value(_get_named_sub_result_idx(name));
293 }
294
296 _PCRE2CPP_CONSTEXPR17 size_t get_search_offset() const noexcept {
297 if (!has_result()) { return bad_offset; }
298 return std::get<_value_result_data>(_data).search_offset;
299 }
300
301 #pragma region RESULT
302
304 _PCRE2CPP_CONSTEXPR17 _match_value get_result() const noexcept {
305 if (!has_value()) { return { bad_offset, _string_type() }; }
306 return std::get<_value_result_data>(_data).result;
307 }
308
310 _PCRE2CPP_CONSTEXPR17 size_t get_result_global_offset() const noexcept {
311 if (!has_value()) { return bad_offset; }
312 const auto& value = std::get<_value_result_data>(_data);
313 return value.search_offset + value.result.relative_offset;
314 }
315
317 _PCRE2CPP_CONSTEXPR17 size_t get_result_relative_offset() const noexcept {
318 if (!has_value()) { return bad_offset; }
319 return std::get<_value_result_data>(_data).result.relative_offset;
320 }
321
323 _PCRE2CPP_CONSTEXPR17 size_t get_result_size() const noexcept {
324 if (!has_value()) { return 0; }
325 return std::get<_value_result_data>(_data).result.value.size();
326 }
327
329 _PCRE2CPP_CONSTEXPR17 _string_type get_result_value() const noexcept {
330 if (!has_value()) { return _string_type(); }
331 return std::get<_value_result_data>(_data).result.value;
332 }
333
334 #pragma endregion RESULT
335
336 #pragma region ALL_SUB_RESULTS
337
339 _PCRE2CPP_CONSTEXPR20 std::vector<std::optional<sub_match_value> > get_sub_results() const noexcept {
340 if (!has_value()) { return {}; }
341 return std::get<_value_result_data>(_data).sub_results;
342 }
343
345 _PCRE2CPP_CONSTEXPR17 size_t get_sub_results_count() const noexcept { return get_sub_results().size(); }
346
348 _PCRE2CPP_CONSTEXPR20 std::vector<size_t> get_sub_results_global_offsets() const noexcept {
349 if (!has_value()) { return {}; }
350
351 const auto& value = std::get<_value_result_data>(_data);
352
353 std::vector<size_t> offsets;
354 offsets.reserve(value.sub_results.size());
355 for (const auto& subResult : value.sub_results) {
356 if (subResult.has_value()) {
357 offsets.push_back(value.search_offset + value.result.relative_offset + subResult->relative_offset);
358 }
359 else { offsets.push_back(bad_offset); }
360 }
361 return offsets;
362 }
363
365 _PCRE2CPP_CONSTEXPR20 std::vector<size_t> get_sub_results_relative_offsets() const noexcept {
366 if (!has_value()) { return {}; }
367
368 const auto& value = std::get<_value_result_data>(_data);
369
370 std::vector<size_t> offsets;
371 offsets.reserve(value.sub_results.size());
372 for (const auto& subResult : value.sub_results) {
373 if (subResult.has_value()) {
374 offsets.push_back(value.result.relative_offset + subResult->relative_offset);
375 }
376 else { offsets.push_back(bad_offset); }
377 }
378 return offsets;
379 }
380
382 _PCRE2CPP_CONSTEXPR20 std::vector<size_t> get_sub_results_in_result_offsets() const noexcept {
383 if (!has_value()) { return {}; }
384
385 const auto& sub_results = std::get<_value_result_data>(_data).sub_results;
386
387 std::vector<size_t> offsets;
388 offsets.reserve(sub_results.size());
389 for (const auto& subResult : sub_results) {
390 if (subResult.has_value()) { offsets.push_back(subResult->relative_offset); }
391 else { offsets.push_back(bad_offset); }
392 }
393 return offsets;
394 }
395
397 _PCRE2CPP_CONSTEXPR20 std::vector<size_t> get_sub_results_sizes() const noexcept {
398 if (!has_value()) { return {}; }
399
400 const auto& sub_results = std::get<_value_result_data>(_data).sub_results;
401
402 std::vector<size_t> values;
403 values.reserve(sub_results.size());
404 for (const auto& subResult : sub_results) {
405 if (subResult.has_value()) { values.emplace_back(subResult->size); }
406 else { values.push_back(0); }
407 }
408 return values;
409 }
410
412 _PCRE2CPP_CONSTEXPR17 std::vector<_string_type> get_sub_results_values() const noexcept {
413 if (!has_value()) { return {}; }
414
415 const auto& data = std::get<_value_result_data>(_data);
416 const auto& value = data.result.value;
417 const auto& sub_results = data.sub_results;
418
419 std::vector<_string_type> values;
420 values.reserve(sub_results.size());
421 for (const auto& subResult : sub_results) {
422 if (subResult.has_value()) {
423 values.emplace_back(value.data() + subResult->relative_offset, subResult->size);
424 }
425 else { values.push_back(_string_type()); }
426 }
427 return values;
428 }
429
430 #pragma endregion ALL_SUB_RESULTS
431
432 #pragma region SUB_RESULTS_BY_IDX
433
435 _PCRE2CPP_CONSTEXPR17 sub_match_value get_sub_result(const size_t idx) const _PCRE2CPP_NOEXCEPT {
436 return _get_sub_value(idx);
437 }
438
441 if (!has_sub_value(idx)) { return bad_offset; }
442
443 const auto [relative_offset, size] = _get_sub_value(idx);
444 const auto& value = std::get<_value_result_data>(_data);
445 return value.search_offset + value.result.relative_offset + relative_offset;
446 }
447
450 if (!has_sub_value(idx)) { return bad_offset; }
451
452 const auto [relative_offset, size] = _get_sub_value(idx);
453 const auto& value = std::get<_value_result_data>(_data);
454 return value.result.relative_offset + relative_offset;
455 }
456
459 if (!has_sub_value(idx)) { return bad_offset; }
460 return _get_sub_value(idx).relative_offset;
461 }
462
464 _PCRE2CPP_CONSTEXPR17 size_t get_sub_result_size(const size_t idx) const _PCRE2CPP_NOEXCEPT {
465 if (!has_sub_value(idx)) { return 0; }
466 return _get_sub_value(idx).size;
467 }
468
470 _PCRE2CPP_CONSTEXPR17 _string_type get_sub_result_value(const size_t idx) const _PCRE2CPP_NOEXCEPT {
471 if (!has_sub_value(idx)) { return _string_type(); }
472
473 const auto [relative_offset, size] = _get_sub_value(idx);
474 const auto& value = std::get<_value_result_data>(_data).result.value;
475 return _string_type(value.data() + relative_offset, size);
476 }
477
478 #pragma endregion
479
480 #pragma region SUB_RESULTS_BY_NAME
481
483 _PCRE2CPP_CONSTEXPR17 sub_match_value get_sub_result(const _string_view_type name) const _PCRE2CPP_NOEXCEPT {
484 return get_sub_result(_get_named_sub_result_idx(name));
485 }
486
488 _PCRE2CPP_CONSTEXPR17 size_t get_sub_result_global_offset(const _string_view_type name) const _PCRE2CPP_NOEXCEPT {
489 return get_sub_result_global_offset(_get_named_sub_result_idx(name));
490 }
491
493 _PCRE2CPP_CONSTEXPR17 size_t get_sub_result_relative_offset(const _string_view_type name) const _PCRE2CPP_NOEXCEPT {
494 return get_sub_result_relative_offset(_get_named_sub_result_idx(name));
495 }
496
498 _PCRE2CPP_CONSTEXPR17 size_t get_sub_result_in_result_offset(const _string_view_type name) const _PCRE2CPP_NOEXCEPT {
499 return get_sub_result_in_result_offset(_get_named_sub_result_idx(name));
500 }
501
503 _PCRE2CPP_CONSTEXPR17 size_t get_sub_result_size(const _string_view_type name) const _PCRE2CPP_NOEXCEPT {
504 return get_sub_result_size(_get_named_sub_result_idx(name));
505 }
506
508 _PCRE2CPP_CONSTEXPR17 _string_type get_sub_result_value(const _string_view_type name) const _PCRE2CPP_NOEXCEPT {
509 return get_sub_result_value(_get_named_sub_result_idx(name));
510 }
511
512 #pragma endregion
513
514 #pragma endregion RESULTS
515 };
516
517 #if _PCRE2CPP_HAS_UTF8
519 #endif
520 #if _PCRE2CPP_HAS_UTF16
522 #endif
523 #if _PCRE2CPP_HAS_UTF32
525 #endif
526
527 #if _PCRE2CPP_HAS_UTF8
529 #elif _PCRE2CPP_HAS_UTF16
531 #elif _PCRE2CPP_HAS_UTF32
533 #endif
534} // namespace pcre2cpp
535 #endif
536#endif
Basic container to result data of match function.
Definition pcre2cpp.hpp:1090
_PCRE2CPP_CONSTEXPR17 bool has_result() const noexcept
returns true when result holds some result not error
Definition pcre2cpp.hpp:1276
_PCRE2CPP_CONSTEXPR17 match_error_codes get_error_code() const noexcept
return error code
Definition pcre2cpp.hpp:1252
_PCRE2CPP_CONSTEXPR17 size_t get_search_offset() const noexcept
returns search offset
Definition pcre2cpp.hpp:1296
_PCRE2CPP_CONSTEXPR17 size_t get_sub_results_count() const noexcept
returns sub results count
Definition pcre2cpp.hpp:1345
_PCRE2CPP_CONSTEXPR17 basic_match_result() noexcept=default
default constructor
_PCRE2CPP_CONSTEXPR17 size_t get_sub_result_global_offset(const size_t idx) const _PCRE2CPP_NOEXCEPT
returns sub result offset from the beginning of searched string
Definition pcre2cpp.hpp:1440
_PCRE2CPP_CONSTEXPR17 size_t get_sub_result_size(const size_t idx) const _PCRE2CPP_NOEXCEPT
returns sub result value size
Definition pcre2cpp.hpp:1464
_PCRE2CPP_CONSTEXPR17 std::vector< _string_type > get_sub_results_values() const noexcept
returns sub results string values
Definition pcre2cpp.hpp:1412
_PCRE2CPP_CONSTEXPR20 std::vector< size_t > get_sub_results_sizes() const noexcept
returns sub results value sizes
Definition pcre2cpp.hpp:1397
_PCRE2CPP_CONSTEXPR17 sub_match_value get_sub_result(const size_t idx) const _PCRE2CPP_NOEXCEPT
returns sub result container
Definition pcre2cpp.hpp:1435
static _PCRE2CPP_CONSTEXPR17 size_t bad_offset
error offset (returned when value doesn't exist or when error has occurred)
Definition pcre2cpp.hpp:1093
_PCRE2CPP_CONSTEXPR17 _string_type get_error_message() const noexcept
returns error message
Definition pcre2cpp.hpp:1258
_PCRE2CPP_CONSTEXPR17 _match_value get_result() const noexcept
returns match result container
Definition pcre2cpp.hpp:1304
_PCRE2CPP_CONSTEXPR17 size_t get_result_global_offset() const noexcept
returns offset of value from the beginning of searched string
Definition pcre2cpp.hpp:1310
_PCRE2CPP_CONSTEXPR17 size_t get_sub_result_in_result_offset(const size_t idx) const _PCRE2CPP_NOEXCEPT
returns sub result offset relative to result offset
Definition pcre2cpp.hpp:1458
_PCRE2CPP_CONSTEXPR20 std::vector< size_t > get_sub_results_in_result_offsets() const noexcept
returns sub results offsets relative to result offset
Definition pcre2cpp.hpp:1382
_PCRE2CPP_CONSTEXPR20 std::vector< std::optional< sub_match_value > > get_sub_results() const noexcept
returns all sub results
Definition pcre2cpp.hpp:1339
_PCRE2CPP_CONSTEXPR17 bool has_error() const noexcept
returns true if result holds error
Definition pcre2cpp.hpp:1249
_PCRE2CPP_CONSTEXPR17 _string_type get_result_value() const noexcept
returns match string value
Definition pcre2cpp.hpp:1329
_PCRE2CPP_CONSTEXPR20 std::vector< size_t > get_sub_results_global_offsets() const noexcept
returns sub results offsets from the beginning of search string
Definition pcre2cpp.hpp:1348
_PCRE2CPP_CONSTEXPR17 size_t get_sub_result_relative_offset(const size_t idx) const _PCRE2CPP_NOEXCEPT
returns sub result offset relative to search offset
Definition pcre2cpp.hpp:1449
_PCRE2CPP_CONSTEXPR17 size_t get_result_size() const noexcept
returns size of match value
Definition pcre2cpp.hpp:1323
_PCRE2CPP_CONSTEXPR20 std::vector< size_t > get_sub_results_relative_offsets() const noexcept
returns sub results offsets relative to search offset
Definition pcre2cpp.hpp:1365
_PCRE2CPP_CONSTEXPR17 size_t get_result_relative_offset() const noexcept
return offset relative to search offset
Definition pcre2cpp.hpp:1317
_PCRE2CPP_CONSTEXPR20 ~basic_match_result() noexcept=default
default destructor
_PCRE2CPP_CONSTEXPR17 bool has_value() const noexcept
returns true when result has value
Definition pcre2cpp.hpp:1279
_PCRE2CPP_CONSTEXPR17 bool has_sub_value(const size_t idx) const noexcept
returns true when result has sub value on given index
Definition pcre2cpp.hpp:1285
_PCRE2CPP_CONSTEXPR17 _string_type get_sub_result_value(const size_t idx) const _PCRE2CPP_NOEXCEPT
returns sub result string value
Definition pcre2cpp.hpp:1470
#define _PCRE2CPP_NOEXCEPT
Definition config.hpp:178
@ UTF_16
Definition pcre2cpp.hpp:357
@ UTF_32
Definition pcre2cpp.hpp:360
@ UTF_8
Definition pcre2cpp.hpp:354
#define _PCRE2CPP_CONSTEXPR17
constexpr for c++17 and higher
Definition config.hpp:239
#define _PCRE2CPP_CONSTEXPR20
constexpr keyword for c++20 and higher
Definition config.hpp:257
#define _PCRE2CPP_ERROR(MESSAGE)
compiler error
Definition config.hpp:278
#define pcre2cpp_assert(expression,...)
pcre2cpp assert
Definition pcre2cpp.hpp:1957
Main namespace of pcre2cpp library.
basic_match_result< utf_type::UTF_8 > u8match_result
Definition pcre2cpp.hpp:1518
basic_match_result< utf_type::UTF_32 > u32match_result
Definition pcre2cpp.hpp:1524
basic_match_result< utf_type::UTF_16 > u16match_result
Definition pcre2cpp.hpp:1521
u8match_result match_result
Definition pcre2cpp.hpp:1528
u8match_value match_value
Definition pcre2cpp.hpp:1061
basic_match_value< utf_type::UTF_16 > u16match_value
Definition pcre2cpp.hpp:1054
basic_match_value< utf_type::UTF_32 > u32match_value
Definition pcre2cpp.hpp:1057
basic_match_value< utf_type::UTF_8 > u8match_value
Definition pcre2cpp.hpp:1051
Match value container.
Definition pcre2cpp.hpp:1039
_string_type value
match value
Definition pcre2cpp.hpp:1047
size_t relative_offset
offset relative to search offset
Definition pcre2cpp.hpp:1045
Sub match value container.
Definition pcre2cpp.hpp:1075
size_t size
size of value
Definition pcre2cpp.hpp:1079
size_t relative_offset
offset relative to search offset
Definition pcre2cpp.hpp:1077